summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-02 15:15:33 +0000
committertv <tv@krebsco.de>2026-12-02 15:44:42 +0000
commit9f720e28e4ab1bcd7273bd18c95f0ec5e2222490 (patch)
treed73fb675a7e0de36ade32489eabffe7757944f0d /pkgs
parent3baa291b244d65e020c8ba6ce94de8d5cca97213 (diff)
pkgs/rust: leave target/ out of the copied source
A checkout in ~/sync/src with a cargo build in it was copied into the store whole. The copying moves to mylib.copyWithout, which the Haskell overlay can use, too.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/rust/default.nix13
1 files changed, 5 insertions, 8 deletions
diff --git a/pkgs/rust/default.nix b/pkgs/rust/default.nix
index c26cf9de..da387670 100644
--- a/pkgs/rust/default.nix
+++ b/pkgs/rust/default.nix
@@ -92,15 +92,12 @@ in
# Copies a Cargo workspace into the store, leaving out what the build
# doesn't need.
- cleanCargoSource = name: src: builtins.path {
- inherit name;
- path = src;
+ cleanCargoSource = name: src: mylib.copyWithout {
+ inherit name src;
+ removeNames = [ ".git" ".graveyard" "target" ];
+ # Cargo.json is the resolved lock.
filter = path: type:
- !builtins.any lib.id [
- (type == "directory" && builtins.elem (baseNameOf path) [ ".git" ".graveyard" ])
- # Cargo.json is the resolved lock.
- (type == "regular" && baseNameOf path == "Cargo.lock" && builtins.pathExists (builtins.dirOf path + "/Cargo.json"))
- ];
+ !(type == "regular" && baseNameOf path == "Cargo.lock" && builtins.pathExists (builtins.dirOf path + "/Cargo.json"));
};
}
[cgit] Unable to lock slot /tmp/cgit/ce100000.lock: Permission denied (13)