From 1d6d5932cd8204f824068b137cfc6d757fec4ab8 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 20 Jan 2015 23:50:38 +0100 Subject: [PATCH] haskell-streaming-commons: fix build on older GHC versions some more --- pkgs/development/haskell-modules/configuration-ghc-7.4.x.nix | 4 ++-- pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix | 4 ++-- pkgs/development/haskell-modules/lib.nix | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.4.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.4.x.nix index d928943fed3c..308e5753b31e 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.4.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.4.x.nix @@ -57,8 +57,8 @@ self: super: { # The test suite depends on time >=1.4.0.2. cookie = dontCheck super.cookie ; - # bytestring >=0.10.2.0 - streaming-commons = addBuildTool super.streaming-commons self.bytestring-builder; + # Work around bytestring >=0.10.2.0 requirement. + streaming-commons = addBuildDepend super.streaming-commons self.bytestring-builder; # Choose appropriate flags for our version of 'bytestring'. bytestring-builder = disableCabalFlag super.bytestring-builder "bytestring_has_builder"; diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix index a0ee12f334d6..1d42535fd280 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix @@ -57,8 +57,8 @@ self: super: { # The test suite depends on time >=1.4.0.2. cookie = dontCheck super.cookie ; - # bytestring >=0.10.2.0 - streaming-commons = addBuildTool super.streaming-commons self.bytestring-builder; + # Work around bytestring >=0.10.2.0 requirement. + streaming-commons = addBuildDepend super.streaming-commons self.bytestring-builder; # Choose appropriate flags for our version of 'bytestring'. bytestring-builder = disableCabalFlag super.bytestring-builder "bytestring_has_builder"; diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix index cc2077ebf86c..d1d69b8aac63 100644 --- a/pkgs/development/haskell-modules/lib.nix +++ b/pkgs/development/haskell-modules/lib.nix @@ -25,6 +25,9 @@ rec { addBuildTool = drv: x: addBuildTools drv [x]; addBuildTools = drv: xs: overrideCabal drv (drv: { buildTools = (drv.buildTools or []) ++ xs; }); + addBuildDepend = drv: x: addBuildDepends drv [x]; + addBuildDepends = drv: xs: overrideCabal drv (drv: { buildDepends = (drv.buildDepends or []) ++ xs; }); + enableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f-${x}") "-f${x}"; disableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f${x}") "-f-${x}";