diff options
Diffstat (limited to 'pkgs/desktops/pantheon/update.nix')
-rw-r--r-- | pkgs/desktops/pantheon/update.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/desktops/pantheon/update.nix b/pkgs/desktops/pantheon/update.nix new file mode 100644 index 00000000000..48fd2f2bf85 --- /dev/null +++ b/pkgs/desktops/pantheon/update.nix @@ -0,0 +1,18 @@ +{ stdenv, writeScript, 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 ] |