mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 03:48:57 +00:00
0b59f4212c
The same way we want them in GNOME in nixpkgs. Didn't touch the greeter expression because I have a branch where it's already rewritten.
35 lines
651 B
Nix
35 lines
651 B
Nix
{ runCommand
|
|
, nix
|
|
, bash
|
|
, git
|
|
, jq
|
|
, nix-prefetch-scripts
|
|
, coreutils
|
|
, common-updater-scripts
|
|
, gnugrep
|
|
, gnused
|
|
, curl
|
|
}:
|
|
|
|
{ repoName
|
|
, attrPath ? repoName
|
|
, versionPolicy ? "release"
|
|
}:
|
|
|
|
let
|
|
script = ./update.sh;
|
|
|
|
updateScript = runCommand "update.sh" {
|
|
inherit bash git jq nix coreutils gnugrep gnused curl;
|
|
# These weren't being substituted
|
|
nix_prefetch_scripts = nix-prefetch-scripts;
|
|
common_updater_scripts = common-updater-scripts;
|
|
} ''
|
|
substituteAll ${script} $out
|
|
chmod +x $out
|
|
'';
|
|
|
|
versionFlag = { "release" = "-r"; "master" = "-m"; }.${versionPolicy};
|
|
|
|
in [ updateScript versionFlag repoName attrPath ]
|