diff options
author | makefu <github@syntax-fehler.de> | 2020-10-23 21:02:02 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2020-10-23 21:02:02 +0200 |
commit | e8b6cc0587929a7ebd0d00f83d298640b20b055f (patch) | |
tree | e0f813b8264119a84d6b8c32fa68041c8541ab59 /lib/default.nix | |
parent | fd41a76d4cab2765f9ef95ce5322b7bffe52b8a7 (diff) | |
parent | 242530680d5dcb37a5a023d0b8f6155ab441cead (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lib/default.nix')
-rw-r--r-- | lib/default.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/default.nix b/lib/default.nix index f02959bba..be9f60f3b 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -60,13 +60,17 @@ let }.${typeOf x}; mapNixDir1 = f: dirPath: + let + toPackageName = name: + if test "^[0-9].*" name then "_${name}" else name; + in listToAttrs (map (relPath: let name = removeSuffix ".nix" relPath; path = dirPath + "/${relPath}"; in - nameValuePair name (f path)) + nameValuePair (toPackageName name) (f path)) (filter (name: name != "default.nix" && !hasPrefix "." name) (attrNames (readDir dirPath)))); |