about summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/gnome-3/update.nix18
1 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/desktops/gnome-3/update.nix b/pkgs/desktops/gnome-3/update.nix
index 216ae9cb8b38..2ee72d46993d 100644
--- a/pkgs/desktops/gnome-3/update.nix
+++ b/pkgs/desktops/gnome-3/update.nix
@@ -3,10 +3,14 @@
 
 let
   python = python3.withPackages (p: [ p.requests ]);
-in writeScript "update-${packageName}" ''
-  #!${stdenv.shell}
-  set -o errexit
-  PATH=${lib.makeBinPath [ common-updater-scripts coreutils gnugrep gnused python ]}
-  latest_tag=$(python "${./find-latest-version.py}" "${packageName}" "${versionPolicy}" "stable")
-  update-source-version "${attrPath}" "$latest_tag"
-''
+  updateScript = writeScript "gnome-update-script" ''
+    #!${stdenv.shell}
+    set -o errexit
+    package_name="$1"
+    attr_path="$2"
+    version_policy="$3"
+    PATH=${lib.makeBinPath [ common-updater-scripts coreutils gnugrep gnused python ]}
+    latest_tag=$(python "${./find-latest-version.py}" "$package_name" "$version_policy" "stable")
+    update-source-version "$attr_path" "$latest_tag"
+  '';
+in [ updateScript packageName attrPath versionPolicy ]