4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ lib, stdenv, fetchzip, jre, makeWrapper }:
|
||
|
||
|
||
stdenv.mkDerivation rec {
|
||
pname = "tabula";
|
||
version = "1.2.1";
|
||
|
||
|
||
src = fetchzip {
|
||
url = "https://github.com/tabulapdf/tabula/releases/download/v${version}/tabula-jar-${version}.zip";
|
||
sha256 = "0lkpv8hkji81fanyxm7ph8421fr9a6phqc3pbhw2bc4gljg7sgxi";
|
||
};
|
||
|
||
|
||
buildInputs = [ makeWrapper ];
|
||
|
||
|
||
installPhase = ''
|
||
mkdir -pv $out/share/tabula
|
||
cp -v * $out/share/tabula
|
||
|
||
makeWrapper ${jre}/bin/java $out/bin/tabula --add-flags "-jar $out/share/tabula/tabula.jar"
|
||
'';
|
||
|
||
|
||
meta = with lib; {
|
||
description = "A tool for liberating data tables locked inside PDF files";
|
||
longDescription = ''
|
||
If you’ve ever tried to do anything with data provided to you in PDFs, you
|
||
know how painful it is — there's no easy way to copy-and-paste rows of data
|
||
out of PDF files. Tabula allows you to extract that data into a CSV or
|
||
Microsoft Excel spreadsheet using a simple, easy-to-use interface.
|
||
'';
|
||
homepage = "https://tabula.technology/";
|
||
license = licenses.mit;
|
||
maintainers = [ maintainers.dpaetzel ];
|
||
platforms = platforms.all;
|
||
};
|
||
}
|