lib.readPathsFromFile: simplify, /cc #24036
This part isn't needed after 36de745e1b
.
This commit is contained in:
parent
64a880faa6
commit
02126b69e5
|
@ -476,9 +476,7 @@ rec {
|
||||||
readPathsFromFile = rootPath: file:
|
readPathsFromFile = rootPath: file:
|
||||||
let
|
let
|
||||||
root = toString rootPath;
|
root = toString rootPath;
|
||||||
lines =
|
lines = lib.splitString "\n" (builtins.readFile file);
|
||||||
builtins.map (lib.removeSuffix "\n")
|
|
||||||
(lib.splitString "\n" (builtins.readFile file));
|
|
||||||
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
|
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
|
||||||
relativePaths = removeComments lines;
|
relativePaths = removeComments lines;
|
||||||
absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths;
|
absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths;
|
||||||
|
|
Loading…
Reference in New Issue