nixpkgs: add an update script
this only updates the master branch -- for now
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# XXX: this is in the bootstrap path;
|
# XXX: this is in the bootstrap path;
|
||||||
# i'm pretty much restricted to using just `builtin`s here.
|
# this means it has to be evaluatable using only builtins,
|
||||||
|
# though i'm free to include optional functionality (e.g. update scripts) so long as i gate it behind availability checks.
|
||||||
#
|
#
|
||||||
# branch workflow:
|
# branch workflow:
|
||||||
# - daily:
|
# - daily:
|
||||||
@@ -20,7 +21,9 @@
|
|||||||
, doPatch ? true
|
, doPatch ? true
|
||||||
, localSystem ? builtins.currentSystem #< not available in pure mode
|
, localSystem ? builtins.currentSystem #< not available in pure mode
|
||||||
, system ? localSystem
|
, system ? localSystem
|
||||||
|
#VVV these may or may not be available when called VVV
|
||||||
, fetchzip ? builtins.fetchTarball
|
, fetchzip ? builtins.fetchTarball
|
||||||
|
, nix-update-script ? null
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
lock = {
|
lock = {
|
||||||
@@ -31,9 +34,8 @@ let
|
|||||||
staging-next.rev = "5aa86ae5585cd46299ee46682fda8a9b76baf2ae";
|
staging-next.rev = "5aa86ae5585cd46299ee46682fda8a9b76baf2ae";
|
||||||
staging-next.sha256 = "sha256:1dqws7fmdv4l9mk45i88ivzlxzm2b4lbdg9rg4am0z1alsz36dzz";
|
staging-next.sha256 = "sha256:1dqws7fmdv4l9mk45i88ivzlxzm2b4lbdg9rg4am0z1alsz36dzz";
|
||||||
};
|
};
|
||||||
unpatchedSrc = let
|
lock' = lock."${variant}";
|
||||||
lock' = lock."${variant}";
|
unpatchedSrc = fetchzip {
|
||||||
in fetchzip {
|
|
||||||
url = "https://github.com/NixOS/nixpkgs/archive/${lock'.rev}.tar.gz";
|
url = "https://github.com/NixOS/nixpkgs/archive/${lock'.rev}.tar.gz";
|
||||||
inherit (lock') sha256;
|
inherit (lock') sha256;
|
||||||
};
|
};
|
||||||
@@ -66,4 +68,15 @@ let
|
|||||||
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
|
(import "${src}" args) // src // {
|
||||||
|
# attributes needed for update scripts
|
||||||
|
name = "nixpkgs";
|
||||||
|
version = "24.05-unstable-2024-06-xx";
|
||||||
|
src = unpatchedSrc // {
|
||||||
|
inherit (lock') rev;
|
||||||
|
};
|
||||||
|
} // (if nix-update-script != null then {
|
||||||
|
passthru.updateScript = nix-update-script {
|
||||||
|
extraArgs = [ "--version" "branch" ];
|
||||||
|
};
|
||||||
|
} else {})
|
||||||
|
Reference in New Issue
Block a user