summaryrefslogtreecommitdiffstats
path: root/lib/strings.nix
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-03-19 14:51:04 +0100
committerVladimír Čunát <vcunat@gmail.com>2017-03-19 14:52:47 +0100
commit02126b69e5f5744cc677a0a025ccabb3b3ca865a (patch)
treefeb73d4e9f7da4151bf3e6cf08691505fcbb3b6a /lib/strings.nix
parent64a880faa6c890ca11ed12b8b1aef4df8e5b1397 (diff)
lib.readPathsFromFile: simplify, /cc #24036
This part isn't needed after 36de745e1b7.
Diffstat (limited to 'lib/strings.nix')
-rw-r--r--lib/strings.nix4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/strings.nix b/lib/strings.nix
index 44b6f8780c84..ffa93c8e454a 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -476,9 +476,7 @@ rec {
readPathsFromFile = rootPath: file:
let
root = toString rootPath;
- lines =
- builtins.map (lib.removeSuffix "\n")
- (lib.splitString "\n" (builtins.readFile file));
+ lines = lib.splitString "\n" (builtins.readFile file);
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
relativePaths = removeComments lines;
absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths;