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.

38 lines
1.1 KiB
Nix
Raw Normal View History

2021-01-27 01:26:46 +00:00
{ stdenv, lib, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "tabula-java";
2021-08-23 04:55:03 +00:00
version = "1.0.5";
2021-01-27 01:26:46 +00:00
src = fetchurl {
url = "https://github.com/tabulapdf/tabula-java/releases/download/v${version}/tabula-${version}-jar-with-dependencies.jar";
2021-08-23 04:55:03 +00:00
sha256 = "sha256-IWHj//ZZOdfOCBJHnPnKNoYNtWl/f8H6ARYe1AkqB0U=";
2021-01-27 01:26:46 +00:00
};
nativeBuildInputs = [ makeWrapper ];
2021-01-27 01:26:46 +00:00
dontUnpack = true;
dontBuild = true;
installPhase = ''
mkdir -pv $out/share/tabula-java
cp -v $src $out/share/tabula-java/tabula-java.jar
makeWrapper ${jre}/bin/java $out/bin/tabula-java --add-flags "-jar $out/share/tabula-java/tabula-java.jar"
'';
meta = with lib; {
description = "A 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/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
2021-01-27 01:26:46 +00:00
license = licenses.mit;
maintainers = [ maintainers.jakewaksbaum ];
platforms = platforms.all;
};
}