From 3685bf378fb64d98a64c8fbf7fc9904ed2e98a83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Tue, 18 Mar 2014 13:40:16 +0100 Subject: [PATCH 1/2] haskell: new expression cabal-bounds --- .../tools/haskell/cabal-bounds/default.nix | 23 +++++++++++++++++++ pkgs/top-level/haskell-packages.nix | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/development/tools/haskell/cabal-bounds/default.nix diff --git a/pkgs/development/tools/haskell/cabal-bounds/default.nix b/pkgs/development/tools/haskell/cabal-bounds/default.nix new file mode 100644 index 000000000000..4cd6adf5ab94 --- /dev/null +++ b/pkgs/development/tools/haskell/cabal-bounds/default.nix @@ -0,0 +1,23 @@ +{ cabal, Cabal, cmdargs, either, filepath, lens, strict, tasty +, tastyGolden, transformers, unorderedContainers +}: + +cabal.mkDerivation (self: { + pname = "cabal-bounds"; + version = "0.4.1"; + sha256 = "09l9ii26li178sw0rm49w4dhfkf46g4sjjdy4frmc74isvnzkpwj"; + isLibrary = true; + isExecutable = true; + buildDepends = [ + Cabal cmdargs either lens strict transformers unorderedContainers + ]; + testDepends = [ filepath tasty tastyGolden ]; + doCheck = false; + jailbreak = true; + + meta = { + description = "A command line program for managing the bounds/versions of the dependencies in a cabal file"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + }; +}) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 02e6472479d8..3eec6e54b098 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -3066,6 +3066,10 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x cabalDelete = callPackage ../development/tools/haskell/cabal-delete {}; + cabalBounds = callPackage ../development/tools/haskell/cabal-bounds { + Cabal = self.Cabal_1_18_1_3; + }; + cabalDev = callPackage ../development/tools/haskell/cabal-dev {}; cabalMeta = callPackage ../development/tools/haskell/cabal-meta {}; From e914f157288dea280431e80e99e3bf7892601187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Thu, 1 May 2014 14:50:01 +0200 Subject: [PATCH 2/2] haskell-cabal-bounds: avoid rebuild of Cabal --- pkgs/top-level/haskell-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 3eec6e54b098..dc39671fc765 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -3067,7 +3067,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x cabalDelete = callPackage ../development/tools/haskell/cabal-delete {}; cabalBounds = callPackage ../development/tools/haskell/cabal-bounds { - Cabal = self.Cabal_1_18_1_3; + Cabal = if pkgs.stdenv.lib.versionAtLeast "7.8" ghc.version + then null + else self.Cabal_1_18_1_3; }; cabalDev = callPackage ../development/tools/haskell/cabal-dev {};