Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.05 37 lines 1.2 kB view raw
1{ stdenv, lib, fetchurl, jre, makeWrapper }: 2 3stdenv.mkDerivation rec { 4 pname = "tabula-java"; 5 version = "1.0.5"; 6 7 src = fetchurl { 8 url = "https://github.com/tabulapdf/tabula-java/releases/download/v${version}/tabula-${version}-jar-with-dependencies.jar"; 9 sha256 = "sha256-IWHj//ZZOdfOCBJHnPnKNoYNtWl/f8H6ARYe1AkqB0U="; 10 }; 11 12 nativeBuildInputs = [ makeWrapper ]; 13 14 dontUnpack = true; 15 dontBuild = true; 16 17 installPhase = '' 18 mkdir -pv $out/share/tabula-java 19 cp -v $src $out/share/tabula-java/tabula-java.jar 20 21 makeWrapper ${jre}/bin/java $out/bin/tabula-java --add-flags "-jar $out/share/tabula-java/tabula-java.jar" 22 ''; 23 24 meta = with lib; { 25 description = "A library for extracting tables from PDF files."; 26 longDescription = '' 27 tabula-java is the table extraction engine that powers 28 Tabula. You can use tabula-java as a command-line tool to 29 programmatically extract tables from PDFs. 30 ''; 31 homepage = "https://tabula.technology/"; 32 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 33 license = licenses.mit; 34 maintainers = [ maintainers.jakewaksbaum ]; 35 platforms = platforms.all; 36 }; 37}