From 5bf8887ed1a14de5b3dc0c7406b5f0d5682c22d9 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Dec 2026 15:15:33 +0000 Subject: 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. --- lib/pure.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib') diff --git a/lib/pure.nix b/lib/pure.nix index 0d807404..68e11e53 100644 --- a/lib/pure.nix +++ b/lib/pure.nix @@ -23,6 +23,17 @@ let else toString x; + # A copy of src in the store, named name, without what is called one of + # removeNames, and without what filter rejects. + copyWithout = { name, src, removeNames, filter ? _: _: true }: + builtins.path { + inherit name; + path = src; + filter = path: type: + !builtins.elem (baseNameOf path) removeNames + && filter path type; + }; + evalModulesConfig = modules: let eval = evalModules { inherit modules; -- cgit v1.3.1