nixpkgs/pkgs/applications/misc/tabula-java/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.3 KiB
Nix
Raw Normal View History

2023-09-09 14:12:09 +00:00
{ lib
, maven
, fetchFromGitHub
, makeWrapper
, jre
}:
2021-01-27 01:26:46 +00:00
2023-09-09 14:12:09 +00:00
maven.buildMavenPackage rec {
2021-01-27 01:26:46 +00:00
pname = "tabula-java";
2021-08-23 04:55:03 +00:00
version = "1.0.5";
2021-01-27 01:26:46 +00:00
2023-09-09 14:12:09 +00:00
src = fetchFromGitHub {
owner = "tabulapdf";
repo = "tabula-java";
rev = "v${version}";
hash = "sha256-lg8/diyGhfkUU0w7PEOlxb1WNpJZVDDllxMMsTIU/Cw=";
2021-01-27 01:26:46 +00:00
};
2024-07-03 23:15:07 +00:00
mvnHash = "sha256-CXJm9YlYsYViChFcH9e2P9pxK0q/tLWODOzZPXZ8hK0=";
2023-09-09 14:12:09 +00:00
mvnParameters = "compile assembly:single -Dmaven.test.skip=true";
2021-01-27 01:26:46 +00:00
2023-09-09 14:12:09 +00:00
nativeBuildInputs = [ makeWrapper ];
2021-01-27 01:26:46 +00:00
installPhase = ''
2023-09-09 14:12:09 +00:00
runHook preInstall
mkdir -p $out/{bin,lib}
cp target/tabula-${version}-jar-with-dependencies.jar $out/lib/tabula.jar
makeWrapper ${jre}/bin/java $out/bin/tabula-java \
--add-flags "-cp $out/lib/tabula.jar" \
--add-flags "technology.tabula.CommandLineApp"
2021-01-27 01:26:46 +00:00
2023-09-09 14:12:09 +00:00
runHook postInstall
2021-01-27 01:26:46 +00:00
'';
meta = with lib; {
description = "Library for extracting tables from PDF files";
longDescription = ''
tabula-java is the table extraction engine that powers
Tabula. You can use tabula-java as a command-line tool to
programmatically extract tables from PDFs.
'';
homepage = "https://tabula.technology/";
license = licenses.mit;
maintainers = [ maintainers.jakewaksbaum ];
platforms = platforms.all;
2024-02-11 02:19:15 +00:00
mainProgram = "tabula-java";
2021-01-27 01:26:46 +00:00
};
}