Merge pull request #328403 from rrcomtech/package/AddingDitaOT

dita-ot: init at 4.2.3
This commit is contained in:
Aleksana 2024-07-26 10:31:32 +08:00 committed by GitHub
commit 0e563a350f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 54 additions and 0 deletions

View File

@ -17414,6 +17414,12 @@
githubId = 1080963;
name = "Roberto";
};
robertrichter = {
email = "robert.richter@rrcomtech.com";
github = "rrcomtech";
githubId = 50635122;
name = "Robert Richter";
};
robgssp = {
email = "robgssp@gmail.com";
github = "robgssp";

View File

@ -0,0 +1,48 @@
{
stdenv,
fetchzip,
openjdk17,
lib,
makeWrapper,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dita-ot";
version = "4.2.3";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ openjdk17 ];
src = fetchzip {
url = "https://github.com/dita-ot/dita-ot/releases/download/${finalAttrs.version}/dita-ot-${finalAttrs.version}.zip";
hash = "sha256-siHz81OuKVF77NsDpldAhq7YxzBFvo9RwGPe/mqkquQ=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/dita-ot/
cp -r $src/* $out/share/dita-ot/
makeWrapper "$out/share/dita-ot/bin/dita" "$out/bin/dita" \
--prefix PATH : "${lib.makeBinPath [ openjdk17 ]}" \
--set-default JDK_HOME "${openjdk17.home}" \
--set-default JAVA_HOME "${openjdk17.home}"
runHook postInstall
'';
passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
meta = {
homepage = "https://dita-ot.org";
changelog = "https://www.dita-ot.org/dev/release-notes/#v${finalAttrs.version}";
description = "The open-source publishing engine for content authored in the Darwin Information Typing Architecture";
license = lib.licenses.asl20;
mainProgram = "dita";
platforms = openjdk17.meta.platforms;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
maintainers = with lib.maintainers; [ robertrichter ];
};
})