about summary refs log tree commit diff
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
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.
-rw-r--r--default.nix2
-rw-r--r--modules/nix/default.nix2
-rw-r--r--nixpkgs/pkgs/top-level/impure.nix4
-rw-r--r--overlays/patches/cgit/default.nix (renamed from nixpkgs-overlays/patches/cgit/default.nix)0
-rw-r--r--overlays/patches/cgit/ui-commit-use-Git-raw-note-format.patch (renamed from nixpkgs-overlays/patches/cgit/ui-commit-use-Git-raw-note-format.patch)0
-rw-r--r--overlays/patches/default.nix (renamed from nixpkgs-overlays/patches/default.nix)0
-rw-r--r--overlays/patches/dino/0001-add-an-option-to-enable-omemo-by-default-in-new-conv.patch (renamed from nixpkgs-overlays/patches/dino/0001-add-an-option-to-enable-omemo-by-default-in-new-conv.patch)0
-rw-r--r--overlays/patches/dino/default.nix (renamed from nixpkgs-overlays/patches/dino/default.nix)0
-rw-r--r--overlays/patches/firefox/beta/D6695.diff (renamed from nixpkgs-overlays/patches/firefox/beta/D6695.diff)0
-rw-r--r--overlays/patches/firefox/nightly/D6695.diff (renamed from nixpkgs-overlays/patches/firefox/nightly/D6695.diff)0
-rw-r--r--overlays/patches/firefox/packages.nix (renamed from nixpkgs-overlays/patches/firefox/packages.nix)0
-rw-r--r--overlays/patches/firefox/profiles.ini (renamed from nixpkgs-overlays/patches/firefox/profiles.ini)0
-rw-r--r--overlays/patches/firefox/release/D6695.diff (renamed from nixpkgs-overlays/patches/firefox/release/D6695.diff)0
-rw-r--r--overlays/patches/firefox/user.js (renamed from nixpkgs-overlays/patches/firefox/user.js)0
-rw-r--r--overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch (renamed from nixpkgs-overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch)0
-rw-r--r--overlays/patches/public-inbox/0004-view-don-t-500-if-no-mail-received-yet.patch (renamed from nixpkgs-overlays/patches/public-inbox/0004-view-don-t-500-if-no-mail-received-yet.patch)0
-rw-r--r--overlays/patches/public-inbox/0005-wwwstream-make-source-info-configurable.patch (renamed from nixpkgs-overlays/patches/public-inbox/0005-wwwstream-make-source-info-configurable.patch)0
-rw-r--r--overlays/patches/public-inbox/default.nix (renamed from nixpkgs-overlays/patches/public-inbox/default.nix)0
-rw-r--r--overlays/patches/python/default.nix (renamed from nixpkgs-overlays/patches/python/default.nix)0
-rw-r--r--overlays/patches/python/packages/hyperkitty/0001-Improve-look-of-fixed-width-messages.patch (renamed from nixpkgs-overlays/patches/python/packages/hyperkitty/0001-Improve-look-of-fixed-width-messages.patch)0
-rw-r--r--overlays/patches/python/packages/hyperkitty/default.nix (renamed from nixpkgs-overlays/patches/python/packages/hyperkitty/default.nix)0
-rw-r--r--overlays/patches/tmux/default.nix (renamed from nixpkgs-overlays/patches/tmux/default.nix)0
-rw-r--r--overlays/scripts/choose/choose.in (renamed from nixpkgs-overlays/scripts/choose/choose.in)0
-rw-r--r--overlays/scripts/choose/choosebin.in (renamed from nixpkgs-overlays/scripts/choose/choosebin.in)0
-rw-r--r--overlays/scripts/choose/default.nix (renamed from nixpkgs-overlays/scripts/choose/default.nix)0
-rw-r--r--overlays/scripts/default.nix (renamed from nixpkgs-overlays/scripts/default.nix)0
26 files changed, 4 insertions, 4 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
diff --git a/modules/nix/default.nix b/modules/nix/default.nix
index 159ef55a768f..9a50dd985eb3 100644
--- a/modules/nix/default.nix
+++ b/modules/nix/default.nix
@@ -23,7 +23,7 @@ in {
   nixpkgs.overlays =
     let
       inherit (builtins) attrNames readDir;
-      dir = ../../nixpkgs-overlays;
+      dir = ../../overlays;
       names = attrNames (readDir dir);
     in
       map (o: import "${dir}/${o}") names;
diff --git a/nixpkgs/pkgs/top-level/impure.nix b/nixpkgs/pkgs/top-level/impure.nix
index 3ba6c08a140b..d390bd9025fa 100644
--- a/nixpkgs/pkgs/top-level/impure.nix
+++ b/nixpkgs/pkgs/top-level/impure.nix
@@ -55,7 +55,7 @@ in
         else
           # it's a file, so the result is the contents of the file itself
           import path;
-    in
+    in (overlays ../../../overlays) ++ (
       if pathOverlays != "" && pathExists pathOverlays then overlays pathOverlays
       else if pathExists homeOverlaysFile && pathExists homeOverlaysDir then
         throw ''
@@ -70,7 +70,7 @@ in
         if !(isDir homeOverlaysDir) then
           throw (homeOverlaysDir + " should be a directory")
         else overlays homeOverlaysDir
-      else []
+      else [])
 
 , crossOverlays ? []
 
diff --git a/nixpkgs-overlays/patches/cgit/default.nix b/overlays/patches/cgit/default.nix
index fa63bf5f14ed..fa63bf5f14ed 100644
--- a/nixpkgs-overlays/patches/cgit/default.nix
+++ b/overlays/patches/cgit/default.nix
diff --git a/nixpkgs-overlays/patches/cgit/ui-commit-use-Git-raw-note-format.patch b/overlays/patches/cgit/ui-commit-use-Git-raw-note-format.patch
index ce1a5aa559cc..ce1a5aa559cc 100644
--- a/nixpkgs-overlays/patches/cgit/ui-commit-use-Git-raw-note-format.patch
+++ b/overlays/patches/cgit/ui-commit-use-Git-raw-note-format.patch
diff --git a/nixpkgs-overlays/patches/default.nix b/overlays/patches/default.nix
index 4c664ba3ab11..4c664ba3ab11 100644
--- a/nixpkgs-overlays/patches/default.nix
+++ b/overlays/patches/default.nix
diff --git a/nixpkgs-overlays/patches/dino/0001-add-an-option-to-enable-omemo-by-default-in-new-conv.patch b/overlays/patches/dino/0001-add-an-option-to-enable-omemo-by-default-in-new-conv.patch
index 030c165d87b8..030c165d87b8 100644
--- a/nixpkgs-overlays/patches/dino/0001-add-an-option-to-enable-omemo-by-default-in-new-conv.patch
+++ b/overlays/patches/dino/0001-add-an-option-to-enable-omemo-by-default-in-new-conv.patch
diff --git a/nixpkgs-overlays/patches/dino/default.nix b/overlays/patches/dino/default.nix
index 2a23ee5e0cc9..2a23ee5e0cc9 100644
--- a/nixpkgs-overlays/patches/dino/default.nix
+++ b/overlays/patches/dino/default.nix
diff --git a/nixpkgs-overlays/patches/firefox/beta/D6695.diff b/overlays/patches/firefox/beta/D6695.diff
index f8a8deeb8581..f8a8deeb8581 100644
--- a/nixpkgs-overlays/patches/firefox/beta/D6695.diff
+++ b/overlays/patches/firefox/beta/D6695.diff
diff --git a/nixpkgs-overlays/patches/firefox/nightly/D6695.diff b/overlays/patches/firefox/nightly/D6695.diff
index 31a08471a8cc..31a08471a8cc 100644
--- a/nixpkgs-overlays/patches/firefox/nightly/D6695.diff
+++ b/overlays/patches/firefox/nightly/D6695.diff
diff --git a/nixpkgs-overlays/patches/firefox/packages.nix b/overlays/patches/firefox/packages.nix
index ec4fdcc5336e..ec4fdcc5336e 100644
--- a/nixpkgs-overlays/patches/firefox/packages.nix
+++ b/overlays/patches/firefox/packages.nix
diff --git a/nixpkgs-overlays/patches/firefox/profiles.ini b/overlays/patches/firefox/profiles.ini
index becf53354e76..becf53354e76 100644
--- a/nixpkgs-overlays/patches/firefox/profiles.ini
+++ b/overlays/patches/firefox/profiles.ini
diff --git a/nixpkgs-overlays/patches/firefox/release/D6695.diff b/overlays/patches/firefox/release/D6695.diff
index e6425af02ca6..e6425af02ca6 100644
--- a/nixpkgs-overlays/patches/firefox/release/D6695.diff
+++ b/overlays/patches/firefox/release/D6695.diff
diff --git a/nixpkgs-overlays/patches/firefox/user.js b/overlays/patches/firefox/user.js
index 8b137891791f..8b137891791f 100644
--- a/nixpkgs-overlays/patches/firefox/user.js
+++ b/overlays/patches/firefox/user.js
diff --git a/nixpkgs-overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch b/overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch
index 811d6149d994..811d6149d994 100644
--- a/nixpkgs-overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch
+++ b/overlays/patches/public-inbox/0003-view-don-t-show-page-if-no-links-follow-it.patch
diff --git a/nixpkgs-overlays/patches/public-inbox/0004-view-don-t-500-if-no-mail-received-yet.patch b/overlays/patches/public-inbox/0004-view-don-t-500-if-no-mail-received-yet.patch
index eb33468e1992..eb33468e1992 100644
--- a/nixpkgs-overlays/patches/public-inbox/0004-view-don-t-500-if-no-mail-received-yet.patch
+++ b/overlays/patches/public-inbox/0004-view-don-t-500-if-no-mail-received-yet.patch
diff --git a/nixpkgs-overlays/patches/public-inbox/0005-wwwstream-make-source-info-configurable.patch b/overlays/patches/public-inbox/0005-wwwstream-make-source-info-configurable.patch
index 605100cd38ae..605100cd38ae 100644
--- a/nixpkgs-overlays/patches/public-inbox/0005-wwwstream-make-source-info-configurable.patch
+++ b/overlays/patches/public-inbox/0005-wwwstream-make-source-info-configurable.patch
diff --git a/nixpkgs-overlays/patches/public-inbox/default.nix b/overlays/patches/public-inbox/default.nix
index f9f573787c1c..f9f573787c1c 100644
--- a/nixpkgs-overlays/patches/public-inbox/default.nix
+++ b/overlays/patches/public-inbox/default.nix
diff --git a/nixpkgs-overlays/patches/python/default.nix b/overlays/patches/python/default.nix
index 332cebfcb3fc..332cebfcb3fc 100644
--- a/nixpkgs-overlays/patches/python/default.nix
+++ b/overlays/patches/python/default.nix
diff --git a/nixpkgs-overlays/patches/python/packages/hyperkitty/0001-Improve-look-of-fixed-width-messages.patch b/overlays/patches/python/packages/hyperkitty/0001-Improve-look-of-fixed-width-messages.patch
index cbf9083ed5e9..cbf9083ed5e9 100644
--- a/nixpkgs-overlays/patches/python/packages/hyperkitty/0001-Improve-look-of-fixed-width-messages.patch
+++ b/overlays/patches/python/packages/hyperkitty/0001-Improve-look-of-fixed-width-messages.patch
diff --git a/nixpkgs-overlays/patches/python/packages/hyperkitty/default.nix b/overlays/patches/python/packages/hyperkitty/default.nix
index e8a4315e2be4..e8a4315e2be4 100644
--- a/nixpkgs-overlays/patches/python/packages/hyperkitty/default.nix
+++ b/overlays/patches/python/packages/hyperkitty/default.nix
diff --git a/nixpkgs-overlays/patches/tmux/default.nix b/overlays/patches/tmux/default.nix
index cc13ac2a86c2..cc13ac2a86c2 100644
--- a/nixpkgs-overlays/patches/tmux/default.nix
+++ b/overlays/patches/tmux/default.nix
diff --git a/nixpkgs-overlays/scripts/choose/choose.in b/overlays/scripts/choose/choose.in
index 7f60b47386a3..7f60b47386a3 100644
--- a/nixpkgs-overlays/scripts/choose/choose.in
+++ b/overlays/scripts/choose/choose.in
diff --git a/nixpkgs-overlays/scripts/choose/choosebin.in b/overlays/scripts/choose/choosebin.in
index 7f8ea520c994..7f8ea520c994 100644
--- a/nixpkgs-overlays/scripts/choose/choosebin.in
+++ b/overlays/scripts/choose/choosebin.in
diff --git a/nixpkgs-overlays/scripts/choose/default.nix b/overlays/scripts/choose/default.nix
index d4e845f8b967..d4e845f8b967 100644
--- a/nixpkgs-overlays/scripts/choose/default.nix
+++ b/overlays/scripts/choose/default.nix
diff --git a/nixpkgs-overlays/scripts/default.nix b/overlays/scripts/default.nix
index 983d32d867a4..983d32d867a4 100644
--- a/nixpkgs-overlays/scripts/default.nix
+++ b/overlays/scripts/default.nix