From add8759f14c9ebb65bca21a95e317e4316d3f6be Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 13 Jul 2020 22:00:09 +0000 Subject: overlays: don't apply to all nixpkgs trees Since the nixlib root is the NIX_PATH root, overlays were in the NIX_PATH as "nixpkgs-overlays". Nixpkgs imports that by default to look for overlays. This meant that an arbitrary Nixpkgs tree would end up trying to use the Nixlib overlays, which wouldn't always work. It would also mean that derivations built from those trees wouldn't match the ones other people would try to build, which is undesirable for working on nixpkgs. I think this is unfortunate behaviour for anybody working on nixpkgs, and nixpkgs probably shouldn't load overlays from impurely at all by default, but it is what it is. Since I can't really change what upstream nixpkgs does here, the best I can do is change the nixpkgs in nixlib. It will now load overlays from a sibling "overlays" directory. Renaming the "nixpkgs-overlays" directory at the nixlib root to "overlays" means that it will be loaded by default _only_ by the nixpkgs it is colocated with. It also means that it is still accessible in the NIX_PATH as , which is fine and convenient as long as nothing starts looking at that by default. --- default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 439a3d30cb20..285cd9177089 100644 --- a/default.nix +++ b/default.nix @@ -3,7 +3,7 @@ let inherit (builtins) attrNames filter match pathExists readDir; - path = ./nixpkgs-overlays; + path = ./overlays; overlayPaths = filter -- cgit 1.4.1