mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
90 lines
2.1 KiB
Nix
90 lines
2.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
unzip,
|
|
jdk11,
|
|
copyDesktopItems,
|
|
iconConvTools,
|
|
makeDesktopItem,
|
|
makeWrapper,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "protege-distribution";
|
|
version = "5.6.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/protegeproject/protege-distribution/releases/download/protege-${version}/Protege-${version}-platform-independent.zip";
|
|
sha256 = "08pr0rn76wcc9bczdf93nlshxbid4z4nyvmaz198hhlq96aqpc3i";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
copyDesktopItems
|
|
iconConvTools
|
|
jdk11
|
|
makeWrapper
|
|
unzip
|
|
];
|
|
|
|
patches = [
|
|
# Replace logic for searching the install directory with a static cd into $out
|
|
./static-path.patch
|
|
# Disable console logging, maintaining only file-based logging
|
|
./disable-console-log.patch
|
|
];
|
|
|
|
postPatch = ''
|
|
# Resolve @out@ (introduced by "static-path.patch") to $out
|
|
substituteInPlace run.sh --subst-var-by out $out
|
|
'';
|
|
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
# 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 {bundles,conf,plugins} $out/protege
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = "Protege";
|
|
desktopName = "Protege Desktop";
|
|
icon = "protege";
|
|
comment = "OWL2 ontology editor";
|
|
categories = [ "Development" ];
|
|
exec = "run-protege";
|
|
})
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "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;
|
|
mainProgram = "run-protege";
|
|
};
|
|
}
|