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.
This commit is contained in:
Yorick 2018-05-04 13:12:09 +02:00 committed by GitHub
parent 977f9a129e
commit 20bb5fb0d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ in
# fix-point made by Nixpkgs.
overlays ? let
isDir = path: pathExists (path + "/.");
pathOverlays = try <nixpkgs-overlays> "";
pathOverlays = try (toString <nixpkgs-overlays>) "";
homeOverlaysFile = homeDir + "/.config/nixpkgs/overlays.nix";
homeOverlaysDir = homeDir + "/.config/nixpkgs/overlays";
overlays = path: