From d32743abe03ed94bcb6dc488c0f982f8645a41cf Mon Sep 17 00:00:00 2001 From: syberant Date: Fri, 31 Jul 2020 18:26:07 +0200 Subject: [PATCH] openjump: 1.3.1 -> 1.15 Also fixes #38452 --- pkgs/applications/misc/openjump/default.nix | 36 ++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/misc/openjump/default.nix b/pkgs/applications/misc/openjump/default.nix index e537180686c..544329ec5e7 100644 --- a/pkgs/applications/misc/openjump/default.nix +++ b/pkgs/applications/misc/openjump/default.nix @@ -1,33 +1,33 @@ -{ stdenv, fetchurl, unzip, runtimeShell }: +{ stdenv, fetchurl, unzip, makeWrapper +, coreutils, gawk, which, gnugrep, findutils +, jdk +}: stdenv.mkDerivation { - name = "openjump-1.3.1"; + pname = "openjump"; + version = "1.15"; src = fetchurl { - url = "mirror://sourceforge/jump-pilot/OpenJUMP/1.3.1/openjump-1.3.1.zip"; - sha256 = "0y4z53yx0x7rp3c8rnj028ni3gr47r35apgcpqp3jl7r2di6zgqm"; + url = "mirror://sourceforge/jump-pilot/OpenJUMP/1.15/OpenJUMP-Portable-1.15-r6241-CORE.zip"; + sha256 = "12snzkv83w6khcdqzp6xahqapwp82af6c7j2q8n0lj62hk79rfgl"; }; - # ln jump.log hack: a different user will probably get a permission denied - # error. Still this is better than getting it always. - # TODO: build from source and patch this + # TODO: build from source unpackPhase = '' mkdir -p $out/bin; cd $out; unzip $src - s=$out/bin/OpenJump - dir=$(echo $out/openjump-*) - cat >> $s << EOF - #!${runtimeShell} - cd $dir/bin - exec ${stdenv.shell} openjump.sh - EOF - chmod +x $s - ln -s /tmp/openjump.log $dir/bin/jump.log ''; - installPhase = ":"; + buildInputs = [unzip makeWrapper]; - buildInputs = [unzip]; + installPhase = '' + dir=$(echo $out/OpenJUMP-*) + + chmod +x $dir/bin/oj_linux.sh + makeWrapper $dir/bin/oj_linux.sh $out/bin/OpenJump \ + --set JAVA_HOME ${jdk.home} \ + --set PATH "${coreutils}/bin:${gawk}/bin:${which}/bin:${gnugrep}/bin:${findutils}/bin" + ''; meta = { description = "Open source Geographic Information System (GIS) written in the Java programming language";