summaryrefslogtreecommitdiffstats
path: root/lib/pure.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure.nix')
-rw-r--r--lib/pure.nix11
1 files changed, 11 insertions, 0 deletions
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;