From 388848fa9f188f25286b62e013609df337174c5c Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 8 Jan 2015 16:52:24 +0100 Subject: [PATCH] haskell-configuration-ghc-7.8.x: various build fixes - mtl-2.2.x needs transformers 0.4.x. - time-1.5.x can't build its test suite. - provide deep overrides for amazonka-* stuff to build with GHC 7.8.x --- .../haskell-modules/configuration-common.nix | 3 +++ .../configuration-ghc-7.8.x.nix | 26 ++++++++++++++++++- .../haskell-modules/hackage-packages.nix | 14 ++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index b60dcefdb75..ec63f243d7e 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -32,6 +32,9 @@ self: super: { # Won't find it's header files without help. sfml-audio = overrideCabal super.sfml-audio (drv: { configureFlags = drv.configureFlags or [] ++ ["--extra-include-dirs=${pkgs.openal}/include/AL"]; }); + # https://github.com/haskell/time/issues/23 + time_1_5_0_1 = overrideCabal super.time_1_5_0_1 (drv: { doCheck = false; }); + # Hacks to make packages compile. abstract-deque = overrideCabal super.abstract-deque (drv: { doCheck = false; }); accelerate-cuda = overrideCabal super.accelerate-cuda (drv: { jailbreak = true; }); diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.8.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.8.x.nix index a95dee11398..27d8ebb85f1 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.8.x.nix @@ -34,6 +34,13 @@ self: super: { unix = null; xhtml = null; + # mtl 2.2.x needs the latest transformers. + mtl_2_2_1 = super.mtl_2_2_1.override { transformers = self.transformers_0_4_2_0; }; +} + +// # packages related to ghcjs + +{ ghcjs-prim = self.mkDerivation { pname = "ghcjs-prim"; version = "0.1.0.0"; @@ -47,5 +54,22 @@ self: super: { }; ghcjs = self.callPackage ../compilers/ghcjs { Cabal = self.Cabal_1_22_0_0; }; - } + +// # packages related to amazonka + +(let + amazonkaEnv = self: super: { + mkDerivation = drv: super.mkDerivation (drv // { doCheck = false; }); + mtl = self.mtl_2_2_1; + nats = self.nats_0_2; + transformers = self.transformers_0_4_2_0; + transformers-compat = overrideCabal super.transformers-compat (drv: { configureFlags = []; }); + }; +in +{ + # These packages need mtl 2.2.x to compile. + amazonka-core = super.amazonka-core.overrideScope amazonkaEnv; + amazonka = super.amazonka.overrideScope amazonkaEnv; + amazonka-cloudwatch = super.amazonka-cloudwatch.overrideScope amazonkaEnv; +}) diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 445083ba62b..ac273334c7f 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -79482,6 +79482,20 @@ self: { license = stdenv.lib.licenses.bsd3; }) {}; + "nats_0_2" = callPackage + ({ mkDerivation, base, hashable }: + mkDerivation { + pname = "nats"; + version = "0.2"; + sha256 = "05skqs5ahbrnwlsxjihkvmsw0n49k9mqdhrv9nqh4dmd1j622r73"; + editedCabalFile = "e401a5253358858109c85e8f17a4b63e7dd86b59cc77ac4baa6a421b6645b439"; + buildDepends = [ base hashable ]; + configureFlags = [ "-fhashable" ]; + homepage = "http://github.com/ekmett/nats/"; + description = "Natural numbers"; + license = stdenv.lib.licenses.bsd3; + }) {}; + "nats" = callPackage ({ mkDerivation, base, hashable }: mkDerivation {