diff options
author | Fabián Heredia Montiel <303897+fabianhjr@users.noreply.github.com> | 2023-11-24 00:02:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-24 00:02:36 +0000 |
commit | 69f966b3410d0f1caf97fb6dea639cef6fa15df4 (patch) | |
tree | c4850dae779b3143347f1772e0f8831a97749813 | |
parent | 5fcb417994899481e7afe4f5805743a26d7a13f4 (diff) | |
parent | b751c28f670ad3ff64beae6a26f06d1485224798 (diff) | |
download | nixlib-69f966b3410d0f1caf97fb6dea639cef6fa15df4.tar nixlib-69f966b3410d0f1caf97fb6dea639cef6fa15df4.tar.gz nixlib-69f966b3410d0f1caf97fb6dea639cef6fa15df4.tar.bz2 nixlib-69f966b3410d0f1caf97fb6dea639cef6fa15df4.tar.lz nixlib-69f966b3410d0f1caf97fb6dea639cef6fa15df4.tar.xz nixlib-69f966b3410d0f1caf97fb6dea639cef6fa15df4.tar.zst nixlib-69f966b3410d0f1caf97fb6dea639cef6fa15df4.zip |
Merge pull request #269191 from nessdoor/pkgs/protege
protege-distribution: 5.5.0 -> 5.6.3
-rw-r--r-- | pkgs/development/web/protege-distribution/default.nix | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/pkgs/development/web/protege-distribution/default.nix b/pkgs/development/web/protege-distribution/default.nix index a6ef66d06950..3051c80f473b 100644 --- a/pkgs/development/web/protege-distribution/default.nix +++ b/pkgs/development/web/protege-distribution/default.nix @@ -1,19 +1,30 @@ -{ lib, stdenv, fetchurl, unzip, jre8 +{ lib +, stdenv +, fetchurl +, unzip +, jdk11 , copyDesktopItems -, makeDesktopItem , iconConvTools +, makeDesktopItem +, makeWrapper }: stdenv.mkDerivation rec { pname = "protege-distribution"; - version = "5.5.0"; + version = "5.6.3"; src = fetchurl { - url = "https://github.com/protegeproject/protege-distribution/releases/download/v${version}/Protege-${version}-platform-independent.zip"; - sha256 = "092x22wyisdnhccx817mqq15sxqdfc7iz4whr4mbvzrd9di6ipjq"; + url = "https://github.com/protegeproject/protege-distribution/releases/download/protege-${version}/Protege-${version}-platform-independent.zip"; + sha256 = "08pr0rn76wcc9bczdf93nlshxbid4z4nyvmaz198hhlq96aqpc3i"; }; - nativeBuildInputs = [ unzip copyDesktopItems iconConvTools ]; + nativeBuildInputs = [ + copyDesktopItems + iconConvTools + jdk11 + makeWrapper + unzip + ]; patches = [ # Replace logic for searching the install directory with a static cd into $out @@ -23,11 +34,8 @@ stdenv.mkDerivation rec { ]; postPatch = '' - # Resolve @out@ (introduced by "static-path.patch") to $out, and set the - # correct Java executable (Protege is a JRE 8 application) - substituteInPlace run.sh \ - --subst-var-by out $out \ - --replace "java -X" "exec ${jre8.outPath}/bin/java -X" + # Resolve @out@ (introduced by "static-path.patch") to $out + substituteInPlace run.sh --subst-var-by out $out ''; dontConfigure = true; @@ -36,20 +44,18 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - mkdir $out - - # Delete non-Linux launch scripts - rm run.{bat,command} + mkdir -p $out/bin - # Move launch script into /bin, giving it a recognizable name - install -D run.sh $out/bin/run-protege + # Wrap launch script to set $JAVA_HOME correctly + mv run.sh $out/bin/run-protege + wrapProgram $out/bin/run-protege --set JAVA_HOME ${jdk11.home} # Generate and copy icons to where they can be found icoFileToHiColorTheme app/Protege.ico protege $out # Move everything else under protege/ mkdir $out/protege - mv {bin,bundles,conf,plugins} $out/protege + mv {bundles,conf,plugins} $out/protege runHook postInstall ''; |