protege-distribution: 5.5.0 -> 5.6.3

This commit is contained in:
Tomas Antonio Lopez 2023-11-22 14:50:25 +01:00
parent 9456f455b4
commit b751c28f67

View File

@ -1,19 +1,30 @@
{ lib, stdenv, fetchurl, unzip, jre8 { lib
, stdenv
, fetchurl
, unzip
, jdk11
, copyDesktopItems , copyDesktopItems
, makeDesktopItem
, iconConvTools , iconConvTools
, makeDesktopItem
, makeWrapper
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "protege-distribution"; pname = "protege-distribution";
version = "5.5.0"; version = "5.6.3";
src = fetchurl { src = fetchurl {
url = "https://github.com/protegeproject/protege-distribution/releases/download/v${version}/Protege-${version}-platform-independent.zip"; url = "https://github.com/protegeproject/protege-distribution/releases/download/protege-${version}/Protege-${version}-platform-independent.zip";
sha256 = "092x22wyisdnhccx817mqq15sxqdfc7iz4whr4mbvzrd9di6ipjq"; sha256 = "08pr0rn76wcc9bczdf93nlshxbid4z4nyvmaz198hhlq96aqpc3i";
}; };
nativeBuildInputs = [ unzip copyDesktopItems iconConvTools ]; nativeBuildInputs = [
copyDesktopItems
iconConvTools
jdk11
makeWrapper
unzip
];
patches = [ patches = [
# Replace logic for searching the install directory with a static cd into $out # Replace logic for searching the install directory with a static cd into $out
@ -23,11 +34,8 @@ stdenv.mkDerivation rec {
]; ];
postPatch = '' postPatch = ''
# Resolve @out@ (introduced by "static-path.patch") to $out, and set the # Resolve @out@ (introduced by "static-path.patch") to $out
# correct Java executable (Protege is a JRE 8 application) substituteInPlace run.sh --subst-var-by out $out
substituteInPlace run.sh \
--subst-var-by out $out \
--replace "java -X" "exec ${jre8.outPath}/bin/java -X"
''; '';
dontConfigure = true; dontConfigure = true;
@ -36,20 +44,18 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir $out mkdir -p $out/bin
# Delete non-Linux launch scripts # Wrap launch script to set $JAVA_HOME correctly
rm run.{bat,command} mv run.sh $out/bin/run-protege
wrapProgram $out/bin/run-protege --set JAVA_HOME ${jdk11.home}
# Move launch script into /bin, giving it a recognizable name
install -D run.sh $out/bin/run-protege
# Generate and copy icons to where they can be found # Generate and copy icons to where they can be found
icoFileToHiColorTheme app/Protege.ico protege $out icoFileToHiColorTheme app/Protege.ico protege $out
# Move everything else under protege/ # Move everything else under protege/
mkdir $out/protege mkdir $out/protege
mv {bin,bundles,conf,plugins} $out/protege mv {bundles,conf,plugins} $out/protege
runHook postInstall runHook postInstall
''; '';