mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
protege-distribution: 5.5.0 -> 5.6.3
This commit is contained in:
parent
9456f455b4
commit
b751c28f67
@ -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
|
||||
mkdir -p $out/bin
|
||||
|
||||
# Delete non-Linux launch scripts
|
||||
rm run.{bat,command}
|
||||
|
||||
# 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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user