summary refs log tree commit diff
path: root/lib/strings.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-09-06 08:09:53 -0400
committerShea Levy <shea@shealevy.com>2018-09-06 08:09:53 -0400
commit18337f3ece325ac0b0b26d05e2ccbe5f6398c937 (patch)
tree401b66e49052817f7042406b51a71e1597dbbf3e /lib/strings.nix
parent0af9072e74c9e70af62e828ba4fb21391df2e601 (diff)
parent6da6accd303be776bb4e958da52046da86f9cb5c (diff)
downloadnixpkgs-18337f3ece325ac0b0b26d05e2ccbe5f6398c937.tar
nixpkgs-18337f3ece325ac0b0b26d05e2ccbe5f6398c937.tar.gz
nixpkgs-18337f3ece325ac0b0b26d05e2ccbe5f6398c937.tar.bz2
nixpkgs-18337f3ece325ac0b0b26d05e2ccbe5f6398c937.tar.lz
nixpkgs-18337f3ece325ac0b0b26d05e2ccbe5f6398c937.tar.xz
nixpkgs-18337f3ece325ac0b0b26d05e2ccbe5f6398c937.tar.zst
nixpkgs-18337f3ece325ac0b0b26d05e2ccbe5f6398c937.zip
Merge branch 'no-toPath'
Diffstat (limited to 'lib/strings.nix')
-rw-r--r--lib/strings.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/strings.nix b/lib/strings.nix
index af932ce6ecf..833f69d2fbf 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;