From 30e488a7d5748a5029dbda2a9e64ac709a4bae93 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Tue, 17 Sep 2024 20:47:29 -0700 Subject: [PATCH] overlay: clean up 2.18 stuff Since Nix 2.24 is now the default in nixpkgs, we should remove the stuff that assumes it's 2.18. Nothing breaks with this change, unless someone is specifically depending on nixVersions.nix_2_18 being Lix. (cherry-picked from commit b0e6f359500d66670cc16f521e4f62d6a0a4864e) --- overlay.nix | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/overlay.nix b/overlay.nix index e43f498..52d3143 100644 --- a/overlay.nix +++ b/overlay.nix @@ -10,7 +10,7 @@ let }); # These packages depend on Nix features that Lix does not support - overridelist_2_18 = [ + overridelist_upstream = [ "attic-client" "devenv" "nix-du" @@ -20,11 +20,6 @@ let "nurl" "prefetch-yarn-deps" # force these onto upstream so we are not regularly rebuilding electron ]; - override_2_18 = prev.lib.genAttrs overridelist_2_18 ( - name: prev.${name}.override { - nix = final.nixVersions.nix_2_18_upstream; - } - ); inherit (prev) lib; @@ -64,7 +59,12 @@ let # errors. This is a simple safeguard to put in at least something that might be seen. maybeWarnWrongMajor = x: if !(lib.hasPrefix supportedLixMajor lixPackageToUse.version) then builtins.trace wrongMajorWarning x else x; - overlay = override_2_18 // { + overlay = + lib.genAttrs overridelist_upstream ( + name: if (lib.functionArgs prev.${name}.override ? "nix") then prev.${name}.override { + nix = final.nixVersions.stable_upstream; + } else prev.${name} + ) // { lix-overlay-present = 1; # used for things that one wouldn't necessarily want to update, but we # nevertheless shove it in the overlay and fixed-point it in case one *does* @@ -73,15 +73,14 @@ let lix = maybeWarnWrongMajor (maybeWarnDuplicate lixPackageToUse); - nixVersions = prev.nixVersions // rec { - nix_2_18 = final.lix; - stable = nix_2_18; - nix_2_18_upstream = prev.nixVersions.nix_2_18; + nixVersions = prev.nixVersions // { + stable = final.lix; + stable_upstream = prev.nixVersions.stable; }; nix-eval-jobs = (prev.nix-eval-jobs.override { # lix - nix = final.nixVersions.nix_2_18; + nix = final.lix; }).overrideAttrs (old: let src = final.lix-sources.nix-eval-jobs; in {