josm: add update script
Tested by reverting 7e2e65497c temporarily
and running the script. I got the same diff, and the output was cached,
so I'm pretty sure this works.
This commit is contained in:
@@ -63,6 +63,11 @@ stdenv.mkDerivation {
|
|||||||
--prefix _JAVA_OPTIONS : "-Dawt.useSystemAAFontSettings=on"
|
--prefix _JAVA_OPTIONS : "-Dawt.useSystemAAFontSettings=on"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
inherit srcs;
|
||||||
|
updateScript = ./update.sh;
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Extensible editor for OpenStreetMap";
|
description = "Extensible editor for OpenStreetMap";
|
||||||
homepage = "https://josm.openstreetmap.de/";
|
homepage = "https://josm.openstreetmap.de/";
|
||||||
|
|||||||
18
pkgs/by-name/jo/josm/update.sh
Executable file
18
pkgs/by-name/jo/josm/update.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash -p curl nurl pup common-updater-scripts
|
||||||
|
|
||||||
|
# partially taken from jitsi-meet/update.sh, as they both scrape an apt repo.
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
version="$(curl https://josm.openstreetmap.de/apt/pool/universe/j/josm/ |
|
||||||
|
pup 'a[href] text{}' |
|
||||||
|
sed -nr 's/josm_[0-9]+.[0-9]+.svn([0-9]+)_all.deb/\1/p' |
|
||||||
|
sort -n |
|
||||||
|
tail -n1)"
|
||||||
|
|
||||||
|
pkgHash="$(nurl -H https://github.com/JOSM/josm "$version-tested")"
|
||||||
|
|
||||||
|
update-source-version josm "$version" --source-key=srcs.jar
|
||||||
|
update-source-version josm "$version" --ignore-same-version --source-key=srcs.macosx
|
||||||
|
update-source-version josm "$version" "$pkgHash" --ignore-same-version --source-key=srcs.pkg
|
||||||
Reference in New Issue
Block a user