Commit 4e85e44b authored by Edward Z. Yang's avatar Edward Z. Yang Committed by GitHub

Merge pull request #4836 from ttuegel/no-nix

Remove Nix expressions
parents 90f2799b c728b537
{ mkDerivation, array, base, base-compat, base-orphans, binary
, bytestring, containers, deepseq, Diff, directory, filepath
, parsec, pretty, process, QuickCheck, stdenv, tagged, tar, tasty
, tasty-golden, tasty-hunit, tasty-quickcheck, time, transformers
, unix
}:
mkDerivation {
pname = "Cabal";
version = "2.1.0.0";
src = ./.;
libraryHaskellDepends = [
array base binary bytestring containers deepseq directory filepath
parsec pretty process time transformers unix
];
testHaskellDepends = [
array base base-compat base-orphans bytestring containers Diff
directory filepath pretty QuickCheck tagged tar tasty tasty-golden
tasty-hunit tasty-quickcheck
];
doCheck = false;
homepage = "http://www.haskell.org/cabal/";
description = "A framework for packaging Haskell software";
license = stdenv.lib.licenses.bsd3;
}
(import ../.).Cabal.env
{ 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, pretty, pretty-show
, process, QuickCheck, random, stdenv, stm, tagged, tar, tasty
, tasty-hunit, tasty-quickcheck, time, unix, zlib
}:
mkDerivation {
pname = "cabal-install";
version = "2.1.0.0";
src = ./.;
isLibrary = false;
isExecutable = true;
setupHaskellDepends = [ base Cabal filepath process ];
libraryHaskellDepends = [
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
pretty process random stm tar time unix zlib
];
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
pretty process random stm tar time unix zlib
];
testHaskellDepends = [
array async base bytestring Cabal containers deepseq directory
edit-distance filepath hashable mtl network network-uri pretty-show
QuickCheck random tagged tar tasty tasty-hunit tasty-quickcheck
time 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;
}
(import ../.).cabal-install.env
with (import <nixpkgs> {});
let
inherit (haskell) lib;
filterSource = drv: # only copy required source files to build directory
let
omitDirs = [ ".cabal-sandbox" ".git" "dist" ];
omitExts = [ ".o" ".hi" ];
hasExt = path: ext: stdenv.lib.hasSuffix ext path;
predicate = path: type:
if type == "directory"
then !(stdenv.lib.elem (baseNameOf path) omitDirs)
else !(stdenv.lib.any (hasExt path) omitExts);
in
lib.overrideCabal drv
(args: args // { src = builtins.filterSource predicate args.src; });
in
haskellPackages.override {
overrides = self: super: {
Cabal =
filterSource (self.callPackage ./Cabal {});
cabal-install =
filterSource (lib.dontCheck (self.callPackage ./cabal-install {}));
hackage-security =
lib.dontCheck super.hackage-security;
};
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment