about summary refs log tree commit diff
path: root/pkgs/development/web
diff options
context:
space:
mode:
authorTomas Antonio Lopez <entropy.overseer@entropic.network>2023-11-22 14:50:25 +0100
committerTomas Antonio Lopez <entropy.overseer@entropic.network>2023-11-22 14:50:25 +0100
commitb751c28f670ad3ff64beae6a26f06d1485224798 (patch)
tree74672e14ffc383be4f132daa90f2795febddc542 /pkgs/development/web
parent9456f455b4f3f89ddb28baadad95f35f7946bb52 (diff)
downloadnixlib-b751c28f670ad3ff64beae6a26f06d1485224798.tar
nixlib-b751c28f670ad3ff64beae6a26f06d1485224798.tar.gz
nixlib-b751c28f670ad3ff64beae6a26f06d1485224798.tar.bz2
nixlib-b751c28f670ad3ff64beae6a26f06d1485224798.tar.lz
nixlib-b751c28f670ad3ff64beae6a26f06d1485224798.tar.xz
nixlib-b751c28f670ad3ff64beae6a26f06d1485224798.tar.zst
nixlib-b751c28f670ad3ff64beae6a26f06d1485224798.zip
protege-distribution: 5.5.0 -> 5.6.3
Diffstat (limited to 'pkgs/development/web')
-rw-r--r--pkgs/development/web/protege-distribution/default.nix42
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
   '';