_010editor: add updatescript (#493167)

This commit is contained in:
Sandro
2026-04-04 17:28:13 +00:00
committed by GitHub
+16
View File
@@ -10,6 +10,7 @@
qt6,
undmg,
xkeyboard-config,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -105,6 +106,21 @@ stdenv.mkDerivation (finalAttrs: {
};
};
passthru = {
updateScript = writeScript "update-010editor" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pcre2 common-updater-scripts
set -eu -o pipefail
# Expect the text in format of "Version: major.minor.patchlevel
newVersion="$(curl -s https://sweetscape.com/download/010editor/ | pcre2grep -o1 'Version: ([0-9]+\.[0-9]+\.[0-9]+)' | sort -u)"
for platform in ${toString finalAttrs.meta.platforms}; do
update-source-version _010editor "$newVersion" --source-key=passthru.srcs.$platform --ignore-same-version
done
'';
};
meta = {
description = "Text and hex editor";
homepage = "https://www.sweetscape.com/010editor/";