From 3205d164c62cc52c904d3d1937cc97055c82ec13 Mon Sep 17 00:00:00 2001 From: Ben Ford Date: Fri, 8 Sep 2017 12:31:02 +0100 Subject: [PATCH 1/4] Fix hw-kafka-client haskell package --- pkgs/development/haskell-modules/configuration-nix.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 36f5f28f2f81..50005c06f7d3 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -105,6 +105,11 @@ self: super: builtins.intersectAttrs super { configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka"; }); + hw-kafka-client = overrideCabal super.hw-kafka-client (drv: { + preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal"; + configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka"; + }); + # Foreign dependency name clashes with another Haskell package. libarchive-conduit = super.libarchive-conduit.override { archive = pkgs.libarchive; }; From 017a356082fb10cee000acba4eab8337ac9a706e Mon Sep 17 00:00:00 2001 From: Ben Ford Date: Fri, 8 Sep 2017 13:08:26 +0100 Subject: [PATCH 2/4] Also had to add dontCheck integration test seems to hang (unit tests all pass) --- pkgs/development/haskell-modules/configuration-nix.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 50005c06f7d3..df6fe0f2d26c 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -105,10 +105,10 @@ self: super: builtins.intersectAttrs super { configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka"; }); - hw-kafka-client = overrideCabal super.hw-kafka-client (drv: { + hw-kafka-client = dontCheck (overrideCabal super.hw-kafka-client (drv: { preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal"; configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka"; - }); + })); # Foreign dependency name clashes with another Haskell package. libarchive-conduit = super.libarchive-conduit.override { archive = pkgs.libarchive; }; From 30ce53d105ce99fdc001c719b44be22565f4bac2 Mon Sep 17 00:00:00 2001 From: Ben Ford Date: Fri, 8 Sep 2017 13:13:22 +0100 Subject: [PATCH 3/4] Add a note about the changes --- pkgs/development/haskell-modules/configuration-nix.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index df6fe0f2d26c..84311e6b09a3 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -105,6 +105,7 @@ self: super: builtins.intersectAttrs super { configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka"; }); + # library has hard coded directories that need to be removed https://github.com/NixOS/nixpkgs/pull/29109 hw-kafka-client = dontCheck (overrideCabal super.hw-kafka-client (drv: { preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal"; configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka"; From 94ba1c02f6aaa18b425cd2032ccdb4fbb728a04c Mon Sep 17 00:00:00 2001 From: Ben Ford Date: Fri, 8 Sep 2017 13:45:56 +0100 Subject: [PATCH 4/4] Change link in explanation to upstream issue --- pkgs/development/haskell-modules/configuration-nix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 84311e6b09a3..6b0eb8c70025 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -105,7 +105,7 @@ self: super: builtins.intersectAttrs super { configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka"; }); - # library has hard coded directories that need to be removed https://github.com/NixOS/nixpkgs/pull/29109 + # library has hard coded directories that need to be removed. Reported upstream here https://github.com/haskell-works/hw-kafka-client/issues/32 hw-kafka-client = dontCheck (overrideCabal super.hw-kafka-client (drv: { preConfigure = "sed -i -e /extra-lib-dirs/d -e /include-dirs/d -e /librdkafka/d hw-kafka-client.cabal"; configureFlags = "--extra-include-dirs=${pkgs.rdkafka}/include/librdkafka";