lib.readPathsFromFile: simplify, /cc #24036

This part isn't needed after 36de745e1b.
This commit is contained in:
Orivej Desh 2017-03-19 14:51:04 +01:00 committed by Vladimír Čunát
parent 64a880faa6
commit 02126b69e5
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
1 changed files with 1 additions and 3 deletions

View File

@ -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;