diff options
author | Nick Braga <nick.braga@bookbub.com> | 2021-11-03 15:57:08 -0400 |
---|---|---|
committer | Yt <raphael@megzari.com> | 2022-03-18 23:14:41 -0400 |
commit | 06f09c3d3ffae1249b9ba29cf307c2b9cb6a95ea (patch) | |
tree | 9e06437f62c51566b50cf2a46932d3b420ad552a /pkgs/tools/graphics/wkhtmltopdf-bin | |
parent | c621d2cfdbd3c61e0343076ca96c9eaa72117788 (diff) |
wkhtmltopdf-bin: init at 0.12.6-1
Diffstat (limited to 'pkgs/tools/graphics/wkhtmltopdf-bin')
-rw-r--r-- | pkgs/tools/graphics/wkhtmltopdf-bin/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/wkhtmltopdf-bin/default.nix b/pkgs/tools/graphics/wkhtmltopdf-bin/default.nix new file mode 100644 index 0000000000000..3c2b446a8e1c7 --- /dev/null +++ b/pkgs/tools/graphics/wkhtmltopdf-bin/default.nix @@ -0,0 +1,51 @@ +{ stdenv, lib, fetchurl, wkhtmltopdf, xar, cpio }: + +stdenv.mkDerivation rec { + + pname = "wkhtmltopdf-bin"; + version = "0.12.6-1"; + sha256 = "1db59kdprzpmvdj1bg47lmfgi3zlvzvqif11sbym9hw61xy6gp3d"; + src = fetchurl { + url = + "https://github.com/wkhtmltopdf/packaging/releases/download/${version}/wkhtmltox-${version}.macos-cocoa.pkg"; + inherit sha256; + }; + + buildInputs = [ xar cpio ]; + + unpackPhase = '' + xar -xf $src + zcat Payload | cpio -i + tar -xf usr/local/share/wkhtmltox-installer/wkhtmltox.tar.gz + ''; + + installPhase = '' + mkdir -p $out + cp -r bin include lib share $out/ + ''; + + dontStrip = true; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/wkhtmltopdf --version + ''; + + meta = with lib; { + homepage = "https://wkhtmltopdf.org/"; + description = + "Tools for rendering web pages to PDF or images (binary package)"; + longDescription = '' + wkhtmltopdf and wkhtmltoimage are open source (LGPL) command line tools + to render HTML into PDF and various image formats using the QT Webkit + rendering engine. These run entirely "headless" and do not require a + display or display service. + + There is also a C library, if you're into that kind of thing. + ''; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ nbr ]; + platforms = [ "x86_64-darwin" ]; + }; +} |