summaryrefslogtreecommitdiffstats
path: root/pkgs
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
commit83125fa856951466ed45dfe6b6f417a37dd7e5da (patch)
treed3ea3f28da42f7b3bc29c8041dff062211f1bdfe /pkgs
parent9f720e28e4ab1bcd7273bd18c95f0ec5e2222490 (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')
-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);
};
}
[cgit] Unable to lock slot /tmp/cgit/56100000.lock: Permission denied (13)