lib/pathsToImportedAttrs: discard string context in the names to prevent flake check error

This commit is contained in:
Pacman99 2021-03-25 20:42:47 -07:00
parent 4f38a88191
commit 68a5a2eecf

View File

@ -21,7 +21,9 @@ rec {
paths' = lib.filter (lib.hasSuffix ".nix") paths;
in
genAttrs' paths' (path: {
name = lib.removeSuffix ".nix" (baseNameOf path);
name = lib.removeSuffix ".nix"
# Safe as long this is just used as a name
(builtins.unsafeDiscardStringContext (baseNameOf path));
value = import path;
});