From 9fdff7530395a2e86f05f3aac11c4f4926e8e734 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 31 Dec 2021 06:56:39 +0100 Subject: [PATCH] gmic-qt: add update script Using printf for creating the hash since otherwise update-source-version would detect multiple hashes. --- pkgs/tools/graphics/gmic-qt/default.nix | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pkgs/tools/graphics/gmic-qt/default.nix b/pkgs/tools/graphics/gmic-qt/default.nix index efcd0a87a4ab..518c7a35c810 100644 --- a/pkgs/tools/graphics/gmic-qt/default.nix +++ b/pkgs/tools/graphics/gmic-qt/default.nix @@ -18,6 +18,12 @@ , gimp ? null , qtbase , qttools +, writeShellScript +, common-updater-scripts +, gnugrep +, gnused +, coreutils +, jq }: let @@ -132,6 +138,33 @@ mkDerivation rec { wrapQtApp "$out/${gimp.targetPluginDir}/gmic_gimp_qt" ''; + passthru = { + updateScript = writeShellScript "${pname}-update-script" '' + set -o errexit + PATH=${lib.makeBinPath [ common-updater-scripts curl gnugrep gnused coreutils jq ]} + + latestVersion=$(curl 'https://gmic.eu/files/source/' | grep -E 'gmic_[^"]+\.tar\.gz' | sed -E 's/.+