@@ -0,0 +1,39 @@
1+{ stdenv, fetchzip, jre, makeWrapper }:
2+
3+
4+stdenv.mkDerivation rec {
5+ name = "tabula-${version}";
6+ version = "1.2.1";
7+
8+
9+ src = fetchzip {
10+ url = "https://github.com/tabulapdf/tabula/releases/download/v${version}/tabula-jar-${version}.zip";
11+ sha256 = "0lkpv8hkji81fanyxm7ph8421fr9a6phqc3pbhw2bc4gljg7sgxi";
12+ };
13+
14+
15+ buildInputs = [ makeWrapper ];
16+
17+
18+ installPhase = ''
19+ mkdir -pv $out/share/tabula
20+ cp -v * $out/share/tabula
21+
22+ makeWrapper ${jre}/bin/java $out/bin/tabula --add-flags "-jar $out/share/tabula/tabula.jar"
23+ '';
24+
25+
26+ meta = with stdenv.lib; {
27+ description = "A tool for liberating data tables locked inside PDF files";
28+ longDescription = ''
29+ If you’ve ever tried to do anything with data provided to you in PDFs, you
30+ know how painful it is — there's no easy way to copy-and-paste rows of data
31+ out of PDF files. Tabula allows you to extract that data into a CSV or
32+ Microsoft Excel spreadsheet using a simple, easy-to-use interface.
33+ '';
34+ homepage = https://tabula.technology/;
35+ license = licenses.mit;
36+ maintainers = [ maintainers.dpaetzel ];
37+ platforms = platforms.all;
38+ };
39+}