about summary refs log tree commit diff
path: root/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-07-13 22:00:09 +0000
committerAlyssa Ross <hi@alyssa.is>2020-07-13 23:10:03 +0000
commitadd8759f14c9ebb65bca21a95e317e4316d3f6be (patch)
tree3a67356df4b197a7add4034478499bc91d2258dc /default.nix
parent424dfb57297d0d1af4467571b8d739b08b02fca8 (diff)
downloadnixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar
nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.gz
nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.bz2
nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.lz
nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.xz
nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.tar.zst
nixlib-add8759f14c9ebb65bca21a95e317e4316d3f6be.zip
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 <overlays>, which
is fine and convenient as long as nothing starts looking at that by
default.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix2
1 files changed, 1 insertions, 1 deletions
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