josm: fix package
This commit is contained in:
parent
329aece2d5
commit
61812d57fb
@ -1,46 +1,50 @@
|
|||||||
{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, jdk11, libXxf86vm }:
|
{ stdenv, fetchurl, fetchsvn, makeWrapper, unzip, jre, libXxf86vm }:
|
||||||
|
let
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "josm";
|
pname = "josm";
|
||||||
version = "16239";
|
version = "16239";
|
||||||
|
srcs = {
|
||||||
src = fetchurl {
|
jar = fetchurl {
|
||||||
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
|
url = "https://josm.openstreetmap.de/download/josm-snapshot-${version}.jar";
|
||||||
sha256 = "041n81mnd587043f8wwjv8ckbx0hlsqf3pc7hzbns1y89xdghms1";
|
sha256 = "041n81mnd587043f8wwjv8ckbx0hlsqf3pc7hzbns1y89xdghms1";
|
||||||
|
};
|
||||||
|
macosx = fetchurl {
|
||||||
|
url = "https://josm.openstreetmap.de/download/macosx/josm-macosx-${version}.zip";
|
||||||
|
sha256 = "1nlw1rvwdfp1hhsxyjli8pylm0hb7k62sa0nqvgyiw54dz78n00c";
|
||||||
|
};
|
||||||
|
pkg = fetchsvn {
|
||||||
|
url = "https://josm.openstreetmap.de/svn/trunk/native/linux/tested";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1qqk4bal84wnb66jym6qrdi10ypzvdzihd4jk5rnyfl3wm5qafbi";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
buildInputs = [ jdk11 makeWrapper ];
|
dontUnpack = true;
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
buildInputs = stdenv.lib.optionals (!stdenv.isDarwin) [ jre makeWrapper ];
|
||||||
name = "josm";
|
|
||||||
exec = "josm";
|
|
||||||
icon = "josm";
|
|
||||||
desktopName = "JOSM";
|
|
||||||
genericName = "OpenStreetMap Editor";
|
|
||||||
comment = meta.description;
|
|
||||||
categories = "Education;Geoscience;Maps;";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Add libXxf86vm to path because it is needed by at least Kendzi3D plugin
|
installPhase =
|
||||||
buildCommand = ''
|
if stdenv.isDarwin then ''
|
||||||
mkdir -p $out/bin $out/share/java
|
mkdir -p $out/Applications
|
||||||
cp -v $src $out/share/java/josm.jar
|
${unzip}/bin/unzip ${srcs.macosx} 'JOSM.app/*' -d $out/Applications
|
||||||
|
'' else ''
|
||||||
|
install -Dm644 ${srcs.jar} $out/share/josm/josm.jar
|
||||||
|
cp -R ${srcs.pkg}/usr/share $out
|
||||||
|
|
||||||
makeWrapper ${jdk11}/bin/java $out/bin/josm \
|
# Add libXxf86vm to path because it is needed by at least Kendzi3D plugin
|
||||||
--add-flags "-jar $out/share/java/josm.jar" \
|
makeWrapper ${jre}/bin/java $out/bin/josm \
|
||||||
--prefix LD_LIBRARY_PATH ":" '${libXxf86vm}/lib'
|
--add-flags "-Djosm.restart=true -Djava.net.useSystemProxies=true" \
|
||||||
|
--add-flags "-jar $out/share/josm/josm.jar" \
|
||||||
mkdir -p $out/share/applications
|
--prefix LD_LIBRARY_PATH ":" '${libXxf86vm}/lib'
|
||||||
cp $desktopItem/share/applications"/"* $out/share/applications
|
'';
|
||||||
mkdir -p $out/share/pixmaps
|
|
||||||
${unzip}/bin/unzip -p $src images/logo_48x48x32.png > $out/share/pixmaps/josm.png
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "An extensible editor for OpenStreetMap";
|
description = "An extensible editor for OpenStreetMap";
|
||||||
homepage = "https://josm.openstreetmap.de/";
|
homepage = "https://josm.openstreetmap.de/";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = [ maintainers.rycee ];
|
maintainers = with maintainers; [ rycee sikmir ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -20176,7 +20176,7 @@ in
|
|||||||
|
|
||||||
joe = callPackage ../applications/editors/joe { };
|
joe = callPackage ../applications/editors/joe { };
|
||||||
|
|
||||||
josm = callPackage ../applications/misc/josm { };
|
josm = callPackage ../applications/misc/josm { jre = jdk11; };
|
||||||
|
|
||||||
jwm = callPackage ../applications/window-managers/jwm { };
|
jwm = callPackage ../applications/window-managers/jwm { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user