summaryrefslogtreecommitdiffstats
path: root/pkgs/haskell
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-02 15:15:51 +0000
committertv <tv@krebsco.de>2026-12-02 15:44:52 +0000
commit460a470aceda32eec69207fa4ab9fc67c5fc0397 (patch)
tree3792b895fadf8151bb607613e162672afeb08436 /pkgs/haskell
parent5bf8887ed1a14de5b3dc0c7406b5f0d5682c22d9 (diff)
pkgs/haskell: leave dist-newstyle/ out of the copied source
lib.cleanSource kept cabal's build directory, so a checkout with a build in it was copied into the store whole. mylib.copyWithout, as for Rust, leaves out .git, .graveyard and dist-newstyle.
Diffstat (limited to 'pkgs/haskell')
-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);
};
}