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
|
let
|
||||||
mkNixpkgs = import ./pkgs/by-name/nixpkgs-bootstrap/mkNixpkgs.nix {};
|
mkNixpkgs = import ./pkgs/by-name/nixpkgs-bootstrap/mkNixpkgs.nix {};
|
||||||
mkPkgs = branch: args: (
|
mkPkgs = branch: args: (
|
||||||
mkNixpkgs (args // { inherit branch; })
|
(mkNixpkgs (args // { inherit branch; })).pkgs
|
||||||
).extend (import ./overlays/all.nix);
|
).extend (import ./overlays/all.nix);
|
||||||
pkgs = mkPkgs "master" { inherit localSystem; };
|
pkgs = mkPkgs "master" { inherit localSystem; };
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
@@ -91,17 +91,16 @@ let
|
|||||||
} // args');
|
} // args');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
# N.B.: this is crafted to allow `nixpkgs.FOO` from other nix code
|
|
||||||
# AND `nix-build -A nixpkgs`
|
|
||||||
patchedSrc.overrideAttrs (base: {
|
patchedSrc.overrideAttrs (base: {
|
||||||
# attributes needed for update scripts
|
# attributes needed for update scripts
|
||||||
inherit version;
|
inherit version;
|
||||||
pname = "nixpkgs";
|
pname = "nixpkgs";
|
||||||
passthru = (base.passthru or {}) // nixpkgs // {
|
passthru = (base.passthru or {}) // {
|
||||||
# override is used to configure hostPlatform higher up.
|
# override is used to configure hostPlatform higher up.
|
||||||
override = overrideArgs: mkNixpkgs (args // overrideArgs);
|
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 = {
|
src = {
|
||||||
# required by unstableGitUpdater
|
# required by unstableGitUpdater
|
||||||
gitRepoUrl = "https://github.com/NixOS/nixpkgs.git";
|
gitRepoUrl = "https://github.com/NixOS/nixpkgs.git";
|
||||||
|
@@ -54,9 +54,6 @@ let
|
|||||||
});
|
});
|
||||||
|
|
||||||
### aliases
|
### aliases
|
||||||
# nixpkgs = nixpkgs-bootstrap.master;
|
|
||||||
# nixpkgs-staging = nixpkgs-bootstrap.staging;
|
|
||||||
# nixpkgs-next = nixpkgs-bootstrap.staging-next;
|
|
||||||
inherit (trivial-builders)
|
inherit (trivial-builders)
|
||||||
copyIntoOwnPackage
|
copyIntoOwnPackage
|
||||||
deepLinkIntoOwnPackage
|
deepLinkIntoOwnPackage
|
||||||
|
Reference in New Issue
Block a user