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

This commit is contained in:
Colin 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.
crossSystem = system;
} else {});
nixpkgs = import "${src}" args;
in
# N.B.: this is crafted to allow `nixpkgs.FOO` from other nix code
# AND `nix-build -A nixpkgs`
(import "${src}" args) // src // {
# attributes needed for update scripts
name = "nixpkgs";
version = "24.05-unstable-2024-06-xx";
src = unpatchedSrc // (if builtins.isAttrs unpatchedSrc then {
inherit (lock') rev;
} else {});
} // (if nix-update-script != null then {
passthru.updateScript = nix-update-script {
extraArgs = [ "--version" "branch" ];
};
} else {})
if src ? overrideAttrs then
src.overrideAttrs (base: {
# attributes needed for update scripts
pname = "nixpkgs";
version = "24.05-unstable-2024-06-xx";
passthru = (base.passthru or {}) // nixpkgs // {
src = unpatchedSrc // {
inherit (lock') rev;
};
updateScript = nix-update-script {
extraArgs = [ "--version" "branch" ];
};
};
})
else
nixpkgs