nixpkgs: get the updateScripts to be populated into me update.pkgs.* attrs

This commit is contained in:
2024-06-08 22:01:33 +00:00
parent ede68b563e
commit 14a5b8d9f2

View File

@@ -65,18 +65,24 @@ let
# so avoid specifying hostPlatform.system on non-cross builds, so i can use upstream caches. # so avoid specifying hostPlatform.system on non-cross builds, so i can use upstream caches.
crossSystem = system; crossSystem = system;
} else {}); } else {});
nixpkgs = import "${src}" args;
in in
# N.B.: this is crafted to allow `nixpkgs.FOO` from other nix code # N.B.: this is crafted to allow `nixpkgs.FOO` from other nix code
# AND `nix-build -A nixpkgs` # AND `nix-build -A nixpkgs`
(import "${src}" args) // src // { if src ? overrideAttrs then
src.overrideAttrs (base: {
# attributes needed for update scripts # attributes needed for update scripts
name = "nixpkgs"; pname = "nixpkgs";
version = "24.05-unstable-2024-06-xx"; version = "24.05-unstable-2024-06-xx";
src = unpatchedSrc // (if builtins.isAttrs unpatchedSrc then { passthru = (base.passthru or {}) // nixpkgs // {
src = unpatchedSrc // {
inherit (lock') rev; inherit (lock') rev;
} else {}); };
} // (if nix-update-script != null then { updateScript = nix-update-script {
passthru.updateScript = nix-update-script {
extraArgs = [ "--version" "branch" ]; extraArgs = [ "--version" "branch" ];
}; };
} else {}) };
})
else
nixpkgs