about summary refs log tree commit diff
path: root/pkgs/development/tools/haskell/haste/haste-cabal-install.nix
blob: dd140409173e6e28bb4e22c3412247a99c27d36a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Haste requires its own patched up version of cabal-install that's not on hackage
{ mkDerivation, array, base, bytestring, Cabal, containers
, directory, extensible-exceptions, filepath, HTTP, mtl, network
, network-uri, pretty, process, QuickCheck, random, regex-posix
, stdenv, stm, tagged, tasty, tasty-hunit, tasty-quickcheck, time
, unix, zlib
, fetchFromGitHub
}:

mkDerivation {
  pname = "cabal-install";
  version = "1.23.0.0";
  src = fetchFromGitHub {
    owner = "valderman";
    repo = "cabal";
    rev = "a1962987ba32d5e20090830f50c6afdc78dae005";
    sha256 = "1gjmscfsikcvgkv6zricpfxvj23wxahndm784lg9cpxrc3pn5hvh";
  };
  isLibrary = false;
  isExecutable = true;
  executableHaskellDepends = [
    array base bytestring Cabal containers directory filepath HTTP mtl
    network network-uri pretty process random stm time unix zlib
  ];
  testHaskellDepends = [
    array base bytestring Cabal containers directory
    extensible-exceptions filepath HTTP mtl network network-uri pretty
    process QuickCheck random regex-posix stm tagged tasty tasty-hunit
    tasty-quickcheck time unix zlib
  ];
  prePatch = ''
    rm -rf Cabal
    cd cabal-install
  '';
  postInstall = ''
    mkdir $out/etc
    mv bash-completion $out/etc/bash_completion.d

    # Manually added by Nix maintainer
    mv -v $out/etc/bash_completion.d/cabal $out/etc/bash_completion.d/haste-cabal
  '';
  doCheck = false;
  homepage = "http://www.haskell.org/cabal/";
  description = "The command-line interface for Cabal and Hackage";
  license = stdenv.lib.licenses.bsd3;
}