From 0448603731c2bf4b6f5212d4ec482c5c678662b0 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 3 Mar 2025 08:28:17 +0000 Subject: [PATCH] bootstrap: avoid ever invoking mkNixpkgs without the `localSystem` argument apparently importing nixpkgs and then `override`ing with `localSystem` isn't enough; it needs `localSystem` from the start. --- impure.nix | 2 +- pkgs/by-name/nixpkgs-bootstrap/master.nix | 9 +++++---- pkgs/by-name/nixpkgs-bootstrap/staging-next.nix | 9 +++++---- pkgs/by-name/nixpkgs-bootstrap/staging.nix | 9 +++++---- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/impure.nix b/impure.nix index fea5b3a32..e598bbaea 100644 --- a/impure.nix +++ b/impure.nix @@ -9,7 +9,7 @@ }: let mkPkgs = branch: args: ( - (import ./pkgs/by-name/nixpkgs-bootstrap/${branch}.nix {}).override args + import ./pkgs/by-name/nixpkgs-bootstrap/${branch}.nix args ).extend (import ./overlays/all.nix); pkgs = mkPkgs "master" { inherit localSystem; }; inherit (pkgs) lib; diff --git a/pkgs/by-name/nixpkgs-bootstrap/master.nix b/pkgs/by-name/nixpkgs-bootstrap/master.nix index 15fc9301d..c90b84914 100644 --- a/pkgs/by-name/nixpkgs-bootstrap/master.nix +++ b/pkgs/by-name/nixpkgs-bootstrap/master.nix @@ -5,11 +5,12 @@ # - nix hash to-sri sha256:xyz # - paste the output as the new `sha256` { - mkNixpkgs ? import ./mkNixpkgs.nix {} -}: -mkNixpkgs { + mkNixpkgs ? import ./mkNixpkgs.nix {}, + ... +}@args: +mkNixpkgs ({ rev = "5db39d669a21ca7f0e76c295e7664b9d938b7042"; sha256 = "sha256-SUZZMAn19X3Ym6lVb18LoXhCS2yicrRr83si5VyJDS0="; version = "0-unstable-2025-02-28"; branch = "master"; -} +} // args) diff --git a/pkgs/by-name/nixpkgs-bootstrap/staging-next.nix b/pkgs/by-name/nixpkgs-bootstrap/staging-next.nix index 37f1c4c9d..f1e1963f8 100644 --- a/pkgs/by-name/nixpkgs-bootstrap/staging-next.nix +++ b/pkgs/by-name/nixpkgs-bootstrap/staging-next.nix @@ -1,9 +1,10 @@ { - mkNixpkgs ? import ./mkNixpkgs.nix {} -}: -mkNixpkgs { + mkNixpkgs ? import ./mkNixpkgs.nix {}, + ... +}@args: +mkNixpkgs ({ rev = "749375426d72ead4bdac625818e7be62a6bbbaf4"; sha256 = "sha256-IDxPfbSdIy7XAP1hneGOfr2jsj+hFUsvFhpRksYqols="; version = "0-unstable-2025-02-28"; branch = "staging-next"; -} +} // args) diff --git a/pkgs/by-name/nixpkgs-bootstrap/staging.nix b/pkgs/by-name/nixpkgs-bootstrap/staging.nix index 27cf7f2cd..28b0300aa 100644 --- a/pkgs/by-name/nixpkgs-bootstrap/staging.nix +++ b/pkgs/by-name/nixpkgs-bootstrap/staging.nix @@ -1,9 +1,10 @@ { - mkNixpkgs ? import ./mkNixpkgs.nix {} -}: -mkNixpkgs { + mkNixpkgs ? import ./mkNixpkgs.nix {}, + ... +}@args: +mkNixpkgs ({ rev = "29dcbf482396b9e5bdf1ec92973a8451e0aaa1d5"; sha256 = "sha256-ps1xz98RAUqrT+V7GFpzf/uHaoh9o5ZoOpE7SnSB6sY="; version = "0-unstable-2025-02-28"; branch = "staging"; -} +} // args)