From 20bb5fb0d94823eca8a4b68bc5ddfce459346d72 Mon Sep 17 00:00:00 2001
From: Yorick <yorick@yorickvanpelt.nl>
Date: Fri, 4 May 2018 13:12:09 +0200
Subject: [PATCH] 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.
---
 pkgs/top-level/impure.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix
index a9f21e45aed4..df462665dd16 100644
--- a/pkgs/top-level/impure.nix
+++ b/pkgs/top-level/impure.nix
@@ -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: