nixpkgs/pkgs/applications/misc/tabula-java/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

51 lines
1.3 KiB
Nix

{ lib
, maven
, fetchFromGitHub
, makeWrapper
, jre
}:
maven.buildMavenPackage rec {
pname = "tabula-java";
version = "1.0.5";
src = fetchFromGitHub {
owner = "tabulapdf";
repo = "tabula-java";
rev = "v${version}";
hash = "sha256-lg8/diyGhfkUU0w7PEOlxb1WNpJZVDDllxMMsTIU/Cw=";
};
mvnHash = "sha256-yULCBHgctZZU3Deod+nQujssmUy+kgdFdgE3NUuFhOw=";
mvnParameters = "compile assembly:single -Dmaven.test.skip=true";
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
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"
runHook postInstall
'';
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;
mainProgram = "tabula-java";
};
}