diff options
Diffstat (limited to 'nixpkgs/pkgs/desktops/pantheon/update.nix')
-rw-r--r-- | nixpkgs/pkgs/desktops/pantheon/update.nix | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/desktops/pantheon/update.nix b/nixpkgs/pkgs/desktops/pantheon/update.nix index 0162de7349a3..7e9aacc0c2b2 100644 --- a/nixpkgs/pkgs/desktops/pantheon/update.nix +++ b/nixpkgs/pkgs/desktops/pantheon/update.nix @@ -1,5 +1,21 @@ -{ runCommand, nix, bash, git, jq, nix-prefetch-scripts, coreutils, common-updater-scripts, gnugrep, gnused, curl }: -{ repoName, attrPath ? repoName, versionPolicy ? "release" }: +{ runCommand +, nix +, bash +, git +, jq +, nix-prefetch-scripts +, coreutils +, common-updater-scripts +, gnugrep +, gnused +, curl +}: + +{ repoName +, attrPath ? repoName +, versionPolicy ? "release" +}: + let script = ./update.sh; @@ -13,6 +29,8 @@ let chmod +x $out ''; - versionFlag = { "release" = "-r"; "master" = "-m"; }.${versionPolicy}; + throwFlag = throw "${versionPolicy} is not a valid versionPolicy - Options are either 'release' or 'master' (defaults to release)."; + + versionFlag = { "release" = "-r"; "master" = "-m"; }.${versionPolicy} or throwFlag; in [ updateScript versionFlag repoName attrPath ] |