From d36f591349bf59ac5a6e60a8c94e500917bf089b Mon Sep 17 00:00:00 2001
From: Shlok Datye <shlok@quant.is>
Date: Fri, 7 May 2021 16:14:07 +0200
Subject: [PATCH] haskellPackages.streamly-archive: unbreak

(The correct libarchive is now being passed into the package.)
---
 .../development/haskell-modules/configuration-hackage2nix.yaml | 1 -
 pkgs/development/haskell-modules/configuration-nix.nix         | 3 +++
 pkgs/development/haskell-modules/hackage-packages.nix          | 2 --
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
index 9c345f6dabc6..9a94c99125bd 100644
--- a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
+++ b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
@@ -10656,7 +10656,6 @@ broken-packages:
   - streaming-sort
   - streaming-utils
   - streaming-with
-  - streamly-archive
   - streamly-fsnotify
   - streamly-lmdb
   - streamproc
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix
index f01758f8f74d..6f38c89088cd 100644
--- a/pkgs/development/haskell-modules/configuration-nix.nix
+++ b/pkgs/development/haskell-modules/configuration-nix.nix
@@ -864,4 +864,7 @@ self: super: builtins.intersectAttrs super {
   cpuid = overrideCabal super.cpuid {
     platforms = pkgs.lib.platforms.x86;
   };
+
+  # Pass the correct libarchive into the package.
+  streamly-archive = super.streamly-archive.override { archive = pkgs.libarchive; };
 }
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index d375f7b3eb86..bdee77f676ab 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -250826,8 +250826,6 @@ self: {
        testSystemDepends = [ archive ];
        description = "Stream data from archives using the streamly library";
        license = lib.licenses.bsd3;
-       hydraPlatforms = lib.platforms.none;
-       broken = true;
      }) {archive = null;};
 
   "streamly-binary" = callPackage