From a20ff8c3fb6579d194eda3a87ff9d0188772c53d Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sun, 26 Jul 2026 20:40:42 +0100 Subject: [PATCH] shell: cleanup 26.05 x86_64-darwin special case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the 26.05 x86_64-darwin special case directly into the `nixpkgs` parameter default, avoiding the need for a `nixpkgs'` binding. This allows reverting the formatting change to the `inherit (import ./ci { … })` line, making post-26.05 cleanup easier. Follow-up-to: f86bce24974ec79a2d5e2c3668bde6475baf36cd --- shell.nix | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/shell.nix b/shell.nix index 81ef55a637f3..e16b9caa950f 100644 --- a/shell.nix +++ b/shell.nix @@ -13,15 +13,10 @@ # { system ? builtins.currentSystem, - nixpkgs ? null, -}: -let - version = builtins.readFile ./.version; - - # On 26.05 we need a CI-pinned Nixpkgs revision that supports x86_64-darwin. - # TODO: remove after 26.05 support ends. - nixpkgs' = - if nixpkgs == null && system == "x86_64-darwin" && version == "26.05" then + nixpkgs ? ( + # On 26.05 we need a CI-pinned Nixpkgs revision that supports x86_64-darwin. + # TODO: remove after 26.05 support ends. + if system == "x86_64-darwin" && (builtins.readFile ./.version) == "26.05" then let pinned = (builtins.fromJSON (builtins.readFile ./ci/pinned.json)).pins; warn = builtins.warn or (import ./lib).warn; @@ -44,16 +39,11 @@ let sha256 = hash; } else - nixpkgs; - - inherit - (import ./ci { - inherit system; - nixpkgs = nixpkgs'; - }) - pkgs - fmt - ; + null + ), +}: +let + inherit (import ./ci { inherit nixpkgs system; }) pkgs fmt; # For `nix-shell -A hello` curPkgs = removeAttrs (import ./. { inherit system; }) [