diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-01-29 12:35:44 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-01-29 12:35:44 +0100 |
commit | 882f53eebb767095a18f8770f190f80087545c78 (patch) | |
tree | 00473dbada1577f357241d1831f2c72c4dac6d74 /by-name-overlay.nix | |
parent | fix(by-name-overlay): Provide the id function as default for `finalizeFunction` (diff) | |
download | nix-library-882f53eebb767095a18f8770f190f80087545c78.zip |
fix(by-name-overlay)!: Remove the `coImportFunction` feature
This enforces an unreasonable file system relationship between two directories. For example, if `dir/a` exists `dir2/a` must also exist. Using this is rather difficult and cumbersome.
Diffstat (limited to 'by-name-overlay.nix')
-rw-r--r-- | by-name-overlay.nix | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/by-name-overlay.nix b/by-name-overlay.nix index 84393b0..3e52e64 100644 --- a/by-name-overlay.nix +++ b/by-name-overlay.nix @@ -14,8 +14,6 @@ baseDirectory, fileName, finalizeFunction ? name: value: value, - coImportsNameFunction ? null, - coImportsWarnMessageObject ? null, useShards ? true, }: let # Takes a list of attrs as input and returns one merged attr set. @@ -60,12 +58,6 @@ namesForElement = shard: _type: let mkPath = name: type: let path = baseDirectory + "/${shard}/${name}" + "/${fileName}"; - coImportPath = - if coImportsNameFunction != null - then - coImportsNameFunction - {inherit shard name;} - else path; in if builtins.pathExists path then @@ -73,9 +65,7 @@ then # The `namesForShard` function should have already printed a warning. null - else if builtins.pathExists coImportPath - then path - else warn "'${builtins.toString coImportPath}' does not exist. Should include ${coImportsWarnMessageObject} for '${shard}/${name}'" path + else path else warn "'${builtins.toString path}' does not exist. Skipped" null; in filterAttrs (name: value: value != null) |