nixpkgs/pkgs/by-name/ve/verapdf/package.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
2025-04-08 02:57:25 -04:00

81 lines
2.0 KiB
Nix

{
lib,
fetchFromGitHub,
maven,
makeWrapper,
stripJavaArchivesHook,
makeDesktopItem,
copyDesktopItems,
jre,
}:
maven.buildMavenPackage rec {
pname = "verapdf";
version = "1.26.4";
mvnParameters = "-pl '!installer' -Dverapdf.timestamp=1980-01-01T00:00:02Z -Dproject.build.outputTimestamp=1980-01-01T00:00:02Z";
src = fetchFromGitHub {
owner = "veraPDF";
repo = "veraPDF-apps";
rev = "v${version}";
hash = "sha256-2g16PJdbC4OgFzLonfZgE7LRw2dKGjLCb2AYvrr8lxA=";
};
patches = [ ./stable-maven-plugins.patch ];
mvnHash = "sha256-VXivLGt440MfloWedtQlGukuZk0yui1QhjrpXGNNzqY=";
nativeBuildInputs = [
makeWrapper
stripJavaArchivesHook
copyDesktopItems
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share
install -Dm644 greenfield-apps/target/greenfield-apps-${lib.versions.majorMinor version}.0.jar $out/share/verapdf.jar
makeWrapper ${jre}/bin/java $out/bin/verapdf-gui --add-flags "-jar $out/share/verapdf.jar"
makeWrapper ${jre}/bin/java $out/bin/verapdf --add-flags "-cp $out/share/verapdf.jar org.verapdf.apps.GreenfieldCliWrapper"
install -Dm644 gui/src/main/resources/org/verapdf/gui/images/icon.png $out/share/icons/hicolor/256x256/apps/verapdf.png
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "veraPDF";
comment = meta.description;
desktopName = "veraPDF";
genericName = "PDF/A Conformance Checker";
exec = "verapdf-gui";
icon = "verapdf";
categories = [
"Development"
"Utility"
];
keywords = [ "PDF" ];
mimeTypes = [ "application/pdf" ];
})
];
meta = {
description = "Command line and GUI industry supported PDF/A and PDF/UA Validation";
homepage = "https://github.com/veraPDF/veraPDF-apps";
license = [
lib.licenses.gpl3Plus
# or
lib.licenses.mpl20
];
mainProgram = "verapdf-gui";
maintainers = [
lib.maintainers.mohe2015
lib.maintainers.kilianar
];
};
}