Unverified Commit 577ab022 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

Merge pull request #312462 from sikmir/openjump

openjump: 1.15 → 2.2.1
parents 58659d00 0f353660
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, unzip, makeWrapper
, coreutils, gawk, which, gnugrep, findutils
, jdk
, jre
}:

stdenv.mkDerivation {
stdenv.mkDerivation rec {
  pname = "openjump";
  version = "1.15";
  version = "2.2.1";
  revision = "r5222%5B94156e5%5D";

  src = fetchurl {
    url = "mirror://sourceforge/jump-pilot/OpenJUMP/1.15/OpenJUMP-Portable-1.15-r6241-CORE.zip";
    sha256 = "12snzkv83w6khcdqzp6xahqapwp82af6c7j2q8n0lj62hk79rfgl";
    url = "mirror://sourceforge/jump-pilot/OpenJUMP/${version}/OpenJUMP-Portable-${version}-${revision}-PLUS.zip";
    hash = "sha256-+/AMmD6NDPy+2Gq1Ji5i/QWGU7FOsU+kKsWoNXcx/VI=";
  };

  # TODO: build from source
  unpackPhase = ''
    mkdir -p $out/bin;
    cd $out; unzip $src
    mkdir -p $out/opt
    unzip $src -d $out/opt
  '';

  nativeBuildInputs = [ makeWrapper unzip ];

  installPhase = ''
    dir=$(echo $out/OpenJUMP-*)
    dir=$(echo $out/opt/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"
    chmod +x "$dir/bin/oj_linux.sh"
    makeWrapper "$dir/bin/oj_linux.sh" $out/bin/OpenJump \
      --set JAVA_HOME ${jre} \
      --set PATH ${lib.makeBinPath [ coreutils gawk which gnugrep findutils ]}
  '';

  meta = {
    description = "Open source Geographic Information System (GIS) written in the Java programming language";
    homepage = "http://www.openjump.org/index.html";
    homepage = "http://www.openjump.org/";
    sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
    license = lib.licenses.gpl2;
    maintainers = [lib.maintainers.marcweber];
    platforms = lib.platforms.linux;
    maintainers = lib.teams.geospatial.members ++ [ lib.maintainers.marcweber ];
    platforms = jre.meta.platforms;
    mainProgram = "OpenJump";
  };
}
+0 −2
Original line number Diff line number Diff line
@@ -33467,8 +33467,6 @@ with pkgs;
    openexr = openexr_3;
  };
  openjump = callPackage ../applications/misc/openjump { };
  open-music-kontrollers = lib.recurseIntoAttrs {
    eteroj = callPackage ../applications/audio/open-music-kontrollers/eteroj.nix { };
    jit = callPackage ../applications/audio/open-music-kontrollers/jit.nix { };