@@ -0,0 +1,32 @@
1+{ fetchurl, stdenv, bash, jre8 }:
2+
3+stdenv.mkDerivation rec {
4+ name = "josm-${version}";
5+ version = "9060";
6+
7+ src = fetchurl {
8+ url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
9+ sha256 = "0c1q0bs3x1j9wzmb52xnppdyvni4li5khbfja7axn2ml09hqa0j2";
10+ };
11+
12+ phases = [ "installPhase" ];
13+
14+ buildInputs = [ jre8 ];
15+
16+ installPhase = ''
17+ mkdir -p $out/bin $out/share/java
18+ cp -v $src $out/share/java/josm.jar
19+ cat > $out/bin/josm <<EOF
20+ #!${bash}/bin/bash
21+ exec ${jre8}/bin/java -jar $out/share/java/josm.jar "\$@"
22+ EOF
23+ chmod 755 $out/bin/josm
24+ '';
25+
26+ meta = with stdenv.lib; {
27+ description = "An extensible editor for OpenStreetMap";
28+ homepage = https://josm.openstreetmap.de/;
29+ license = licenses.gpl2Plus;
30+ maintainers = [ maintainers.rycee ];
31+ };
32+}