mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 17:10:48 +00:00
protege-distribution: init at 5.5.0
Protege Desktop distribution package with third-party plugins.
This commit is contained in:
parent
228baac5a4
commit
39a4c60782
73
pkgs/development/web/protege-distribution/default.nix
Normal file
73
pkgs/development/web/protege-distribution/default.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{ lib, stdenv, fetchurl, unzip, jre8, copyDesktopItems, makeDesktopItem }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "protege-distribution";
|
||||
version = "5.5.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/protegeproject/protege-distribution/releases/download/v${version}/Protege-${version}-platform-independent.zip";
|
||||
sha256 = "092x22wyisdnhccx817mqq15sxqdfc7iz4whr4mbvzrd9di6ipjq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip copyDesktopItems ];
|
||||
|
||||
postPatch = ''
|
||||
# Delete all those commands meant to change directory to the source directory
|
||||
sed -i -e '3,9d' run.sh
|
||||
|
||||
# Change directory to where the application is stored to avoid heavy patching
|
||||
# of searchpaths
|
||||
sed -i -e "2a\
|
||||
cd $out/protege" run.sh
|
||||
|
||||
# Set the correct Java executable (Protege is a JRE 8 application)
|
||||
substituteInPlace run.sh \
|
||||
--replace "java -X" "exec ${jre8.outPath}/bin/java -X" \
|
||||
|
||||
# Silence console logs, since these are not shown in graphical environments
|
||||
sed -i -e '4,8d;21d' conf/logback.xml
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir $out
|
||||
|
||||
# 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
|
||||
|
||||
# Copy icon to where it can be found
|
||||
install -D app/Protege.ico $out/share/icons/hicolor/128x128/apps/protege.ico
|
||||
|
||||
# Move everything else under protege/
|
||||
mkdir $out/protege
|
||||
mv {bin,bundles,conf,plugins} $out/protege
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "Protege";
|
||||
desktopName = "Protege Desktop";
|
||||
icon = "protege.ico";
|
||||
comment = "OWL2 ontology editor";
|
||||
exec = "run-protege";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The OWL2 ontology editor from Stanford, with third-party plugins included";
|
||||
homepage = "https://protege.stanford.edu/";
|
||||
downloadPage = "https://protege.stanford.edu/products.php#desktop-protege";
|
||||
maintainers = with maintainers; [ nessdoor ];
|
||||
license = with licenses; [ asl20 bsd2 epl10 lgpl3 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -12733,6 +12733,8 @@ in
|
|||
pharo-spur64 = assert stdenv.is64bit; pharo-vms.spur64;
|
||||
pharo-launcher = callPackage ../development/pharo/launcher { };
|
||||
|
||||
protege-distribution = callPackage ../development/web/protege-distribution { };
|
||||
|
||||
umr = callPackage ../development/misc/umr {
|
||||
llvmPackages = llvmPackages_latest;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue