nixpkgs-bootstrap: get rid of "override"

this reduces the number of times we have to 'import' different nixpkgs during bootstrap
This commit is contained in:
2025-05-09 06:19:41 +00:00
parent 86528b5fcc
commit 17cdca36ca
2 changed files with 5 additions and 7 deletions

View File

@@ -9,9 +9,11 @@
}:
let
mkNixpkgs = import ./pkgs/by-name/nixpkgs-bootstrap/mkNixpkgs.nix {};
mkPkgs = branch: args: (
(mkNixpkgs (args // { inherit branch; })).pkgs
).extend (import ./overlays/all.nix);
mkPkgs = branch: config: (
import ./pkgs/by-name/nixpkgs-bootstrap/${branch}.nix {
mkNixpkgs = args: mkNixpkgs (config // args);
}
).pkgs.extend (import ./overlays/all.nix);
pkgs = mkPkgs "master" { inherit localSystem; };
inherit (pkgs) lib;

View File

@@ -141,10 +141,6 @@ let
inherit version;
pname = "nixpkgs";
passthru = (base.passthru or {}) // {
# override is used to configure hostPlatform higher up.
# TODO: refactor to avoid overriding.
override = overrideArgs: mkNixpkgs (args // overrideArgs);
pkgs = nixpkgs;
src = {