diff options
Diffstat (limited to 'pkgs/development/libraries/haskell/binary/default.nix')
-rw-r--r-- | pkgs/development/libraries/haskell/binary/default.nix | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/pkgs/development/libraries/haskell/binary/default.nix b/pkgs/development/libraries/haskell/binary/default.nix index 9f208e1ced106..081779fd31245 100644 --- a/pkgs/development/libraries/haskell/binary/default.nix +++ b/pkgs/development/libraries/haskell/binary/default.nix @@ -1,41 +1,11 @@ -{stdenv, fetchurl, ghc}: - -stdenv.mkDerivation (rec { +{cabal}: +cabal.mkDerivation (self : { pname = "binary"; version = "0.4.1"; - - name = "${pname}-${version}"; - - src = fetchurl { - url = "http://hackage.haskell.org/packages/archive/${pname}/${version}/${pname}-${version}.tar.gz"; - sha256 = "bb74824306843da25f6d97c271e2a06ee3a7e05fc529156fb81d7c576688e549"; - }; - - buildInputs = [ghc]; - + sha256 = "bb74824306843da25f6d97c271e2a06ee3a7e05fc529156fb81d7c576688e549"; meta = { description = "Efficient, pure binary serialisation using lazy ByteStrings"; }; +}) - configurePhase = '' - ghc --make Setup.lhs - ./Setup configure --prefix="$out" - ''; - - buildPhase = '' - ./Setup build - ''; - - installPhase = '' - ./Setup copy - ./Setup register --gen-script - mkdir $out/nix-support - sed -i 's/|.*\(ghc-pkg update\)/| \1/' register.sh - cp register.sh $out/nix-support/register-ghclib.sh - sed -i 's/\(ghc-pkg update\)/\1 --user/' register.sh - mkdir $out/bin - cp register.sh $out/bin/register-ghclib-${name}.sh - ''; - -}) |