diff options
author | Shea Levy <shea@shealevy.com> | 2018-09-06 08:09:53 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-09-06 08:09:53 -0400 |
commit | 18337f3ece325ac0b0b26d05e2ccbe5f6398c937 (patch) | |
tree | 401b66e49052817f7042406b51a71e1597dbbf3e /lib/strings.nix | |
parent | 0af9072e74c9e70af62e828ba4fb21391df2e601 (diff) | |
parent | 6da6accd303be776bb4e958da52046da86f9cb5c (diff) |
Merge branch 'no-toPath'
Diffstat (limited to 'lib/strings.nix')
-rw-r--r-- | lib/strings.nix | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/strings.nix b/lib/strings.nix index af932ce6ecff8..833f69d2fbfe2 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -501,7 +501,7 @@ rec { isStorePath = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/" - && dirOf (builtins.toPath x) == builtins.storeDir; + && dirOf x == builtins.storeDir; /* Convert string to int Obviously, it is a bit hacky to use fromJSON that way. @@ -537,11 +537,10 @@ rec { */ readPathsFromFile = rootPath: file: let - root = toString rootPath; 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; + absolutePaths = builtins.map (path: rootPath + "/${path}") relativePaths; in absolutePaths; |