nixpkgs-bootstrap: rework "mkNixpkgs" such that "nixpkgs-bootstrap.$channel.updateScript" can be evaluated *without* importing the underlying nixpkgs
this makes it possible to update out of a nixpkgs staging rev whose toplevel attrset doesn't eval
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
let
|
||||
mkNixpkgs = import ./pkgs/by-name/nixpkgs-bootstrap/mkNixpkgs.nix {};
|
||||
mkPkgs = branch: args: (
|
||||
mkNixpkgs (args // { inherit branch; })
|
||||
(mkNixpkgs (args // { inherit branch; })).pkgs
|
||||
).extend (import ./overlays/all.nix);
|
||||
pkgs = mkPkgs "master" { inherit localSystem; };
|
||||
inherit (pkgs) lib;
|
||||
|
@@ -91,17 +91,16 @@ let
|
||||
} // args');
|
||||
}
|
||||
else
|
||||
# N.B.: this is crafted to allow `nixpkgs.FOO` from other nix code
|
||||
# AND `nix-build -A nixpkgs`
|
||||
patchedSrc.overrideAttrs (base: {
|
||||
# attributes needed for update scripts
|
||||
inherit version;
|
||||
pname = "nixpkgs";
|
||||
passthru = (base.passthru or {}) // nixpkgs // {
|
||||
passthru = (base.passthru or {}) // {
|
||||
# override is used to configure hostPlatform higher up.
|
||||
override = overrideArgs: mkNixpkgs (args // overrideArgs);
|
||||
|
||||
# N.B.: src has to be specified in passthru, not the outer scope, so as to take precedence over the nixpkgs `src` package
|
||||
pkgs = nixpkgs;
|
||||
|
||||
src = {
|
||||
# required by unstableGitUpdater
|
||||
gitRepoUrl = "https://github.com/NixOS/nixpkgs.git";
|
||||
|
@@ -54,9 +54,6 @@ let
|
||||
});
|
||||
|
||||
### aliases
|
||||
# nixpkgs = nixpkgs-bootstrap.master;
|
||||
# nixpkgs-staging = nixpkgs-bootstrap.staging;
|
||||
# nixpkgs-next = nixpkgs-bootstrap.staging-next;
|
||||
inherit (trivial-builders)
|
||||
copyIntoOwnPackage
|
||||
deepLinkIntoOwnPackage
|
||||
|
Reference in New Issue
Block a user