diff options
| -rw-r--r-- | by-name.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/by-name.nix b/by-name.nix index 2d03e75..1b03712 100644 --- a/by-name.nix +++ b/by-name.nix @@ -7,7 +7,6 @@ # # You should have received a copy of the License along with this program. # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{warn}: # Adapted from this: https://github.com/NixOS/nixpkgs/blob/1814b56453c91192f6d5a6276079948f9fe96c18/pkgs/top-level/by-name-overlay.nix # This file should not depend on `pkgs` and thus not use `lib`. { @@ -77,7 +76,7 @@ assert fileRegex == null -> fileName != null; let # Type: String -> String -> ListOf Path namesForShard = shard: type: if type != "directory" - then warn "Ignored non-directory, whilst importing by-name directory (${fileDisplay}): '${shard}'" {} + then builtins.warn "Ignored non-directory, whilst importing by-name directory (${fileDisplay}): '${shard}'" {} else if useShards then namesForElementShard shard type else namesForElementDirect shard type; @@ -102,14 +101,14 @@ assert fileRegex == null -> fileName != null; let else if relativePaths then pathSegment else path - else warn "'${builtins.toString path}' does not exist. Skipped" null; + else builtins.warn "'${builtins.toString path}' does not exist. Skipped" null; in if toplevelType != "directory" then # The `namesForShard` function should have already printed a warning. [null] else if (builtins.attrValues paths) == [] - then warn "'${fileDisplay}' did not match anything in ${builtins.toString rawPath}. Skipped" [null] + then builtins.warn "'${fileDisplay}' did not match anything in ${builtins.toString rawPath}. Skipped" [null] else mapAttrsToList checkPath paths; filterNull = list: builtins.filter (value: value != null) list; |
