summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/non-hackage-packages.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/haskell-modules/non-hackage-packages.nix')
-rw-r--r--pkgs/development/haskell-modules/non-hackage-packages.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/non-hackage-packages.nix b/pkgs/development/haskell-modules/non-hackage-packages.nix
index b7b057f2dc2..1793299bf6c 100644
--- a/pkgs/development/haskell-modules/non-hackage-packages.nix
+++ b/pkgs/development/haskell-modules/non-hackage-packages.nix
@@ -12,4 +12,44 @@ self: super: {
 
   # https://github.com/channable/vaultenv/issues/1
   vaultenv = self.callPackage ../tools/haskell/vaultenv { };
+
+  cabal-install-3 = (self.callPackage
+    ({ mkDerivation, array, async, base, base16-bytestring, binary
+     , bytestring, Cabal, containers, cryptohash-sha256, deepseq
+     , directory, echo, edit-distance, filepath, hackage-security
+     , hashable, HTTP, mtl, network, network-uri, parsec, pretty
+     , process, random, resolv, stdenv, stm, tar, text, time, unix, zlib
+     , fetchFromGitHub
+     }:
+     mkDerivation {
+       pname = "cabal-install";
+       version = "3.0.0.0";
+       src = fetchFromGitHub {
+         owner = "haskell";
+         repo = "cabal";
+         rev = "b0e52fa173573705e861b129d9675e59de891e46";
+         sha256 = "1fbph6crsn9ji8ps1k8dsxvgqn38rp4ffvv6nia1y7rbrdv90ass";
+       };
+       postUnpack = "sourceRoot+=/cabal-install";
+       isLibrary = false;
+       isExecutable = true;
+       setupHaskellDepends = [ base Cabal filepath process ];
+       executableHaskellDepends = [
+         array async base base16-bytestring binary bytestring Cabal
+         containers cryptohash-sha256 deepseq directory echo edit-distance
+         filepath hackage-security hashable HTTP mtl network network-uri
+         parsec pretty process random resolv stm tar text time unix zlib
+       ];
+       doCheck = false;
+       postInstall = ''
+         mkdir $out/etc
+         mv bash-completion $out/etc/bash_completion.d
+       '';
+       homepage = "http://www.haskell.org/cabal/";
+       description = "The command-line interface for Cabal and Hackage";
+       license = stdenv.lib.licenses.bsd3;
+     }) {}).overrideScope (self: super: {
+       Cabal = self.Cabal_3_0_0_0;
+     });
+
 }