From 0dda9887467c1ac338d277e358e7eb86e08d34b4 Mon Sep 17 00:00:00 2001 From: Morgan Helton Date: Sun, 15 Sep 2024 14:40:36 -0500 Subject: [PATCH] fix: check package arguments before applying nix 2.18 override --- overlay.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/overlay.nix b/overlay.nix index 8b0ae80..5c3c589 100644 --- a/overlay.nix +++ b/overlay.nix @@ -21,11 +21,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; @@ -65,7 +60,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_2_18 ( + name: if (lib.functionArgs prev.${name}.override ? "nix") then prev.${name}.override { + nix = final.nixVersions.nix_2_18_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* -- 2.44.1