summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/haskell/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/haskell/default.nix b/pkgs/haskell/default.nix
index 5ab04d44..68b79b8c 100644
--- a/pkgs/haskell/default.nix
+++ b/pkgs/haskell/default.nix
@@ -14,6 +14,13 @@ self: super: let
(lib.filterAttrs
(pname: type: type == "directory" && builtins.pathExists (root + "/${pname}/${pname}.cabal"))
(builtins.readDir root)));
+
+ # Copies a Haskell project into the store, leaving out what the build
+ # doesn't need.
+ cleanHaskellSource = name: src: mylib.copyWithout {
+ inherit name src;
+ removeNames = [ ".git" ".graveyard" "dist-newstyle" ];
+ };
in {
# nixpkgs applies packageOverrides to every Haskell package set, including
# haskellPackages.
@@ -22,6 +29,6 @@ in {
(hself: hsuper:
mylib.mapNixDir (path: hself.callPackage path {}) [ ./. ]
//
- lib.mapAttrs (pname: src: hself.callCabal2nix pname (lib.cleanSource src) {}) automaticPackages);
+ lib.mapAttrs (pname: src: hself.callCabal2nix pname (cleanHaskellSource pname src) {}) automaticPackages);
};
}