diff options
author | Vincent Ambo <mail@tazj.in> | 2021-12-07T09·54+0300 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-12-08T18·22+0000 |
commit | 2fa157ccd6e1aa8a0bdeda3a9b720bc6b8f5910e (patch) | |
tree | cfbe48023f7f3745c4a6b5a34a9e53d7f805cb86 /nix/readTree | |
parent | 14bf3f3cd98bfd766d011c22d45b9d74d84c7da7 (diff) |
fix(readTree): Apply .skip-subtree to Nix-file children as well r/3158
This behaviour was previously confusing, since readTree's data structure treats children from Nix files and directories as identical but only one of them would be affected by .skip-subtree The "subtree" to be skipped here refers to all children of the structure. Change-Id: Idf596c9823f09cc2acf49523916bde4b801b8519
Diffstat (limited to 'nix/readTree')
-rw-r--r-- | nix/readTree/default.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nix/readTree/default.nix b/nix/readTree/default.nix index 2ad8e40f6c28..5468d41fd2c7 100644 --- a/nix/readTree/default.nix +++ b/nix/readTree/default.nix @@ -100,7 +100,8 @@ let }) (filter filterDir (attrNames dir)); # Import Nix files - nixFiles = filter (f: f != null) (map nixFileName (attrNames dir)); + nixFiles = if hasAttr ".skip-subtree" dir then [] + else filter (f: f != null) (map nixFileName (attrNames dir)); nixChildren = map (c: let p = joinChild (c + ".nix"); childParts = parts ++ [ c ]; |