impure.nix: stringify path from NIX_PATH
If impure.nix gets the path from NIX_PATH, the type is `path`, and `path+"/."` is a no-op. Stringify it first so `isDir` will return false if it's not, in fact, a dir. This way, single files can be specified with nixpkgs-overlays in the NIX_PATH.
commit20bb5fb0d94823eca8a4b68bc5ddfce459346d72
authorYorick <yorick@yorickvanpelt.nl>
dateFri 4 May 2018, 13:12 (9 years ago)
parent977f9a1
pkgs/top-level/impure.nix+1−1
@@ -41,7 +41,7 @@ in
4141 # fix-point made by Nixpkgs.
4242 overlays ? let
4343 isDir = path: pathExists (path + "/.");
44− pathOverlays = try <nixpkgs-overlays> "";
44+ pathOverlays = try (toString <nixpkgs-overlays>) "";
4545 homeOverlaysFile = homeDir + "/.config/nixpkgs/overlays.nix";
4646 homeOverlaysDir = homeDir + "/.config/nixpkgs/overlays";
4747 overlays = path: