nixpkgs-suyu/pkgs/tools/graphics/wkhtmltopdf/default.nix
Michael Howell 66d9561345 Fix compilation
```
building '/nix/store/7n2cag47gl93wp3f0mv7fiq3dybq2a6l-wkhtmltopdf-0.12.5.drv'...
unpacking sources
unpacking source archive /nix/store/lv2zcapqqn1kjlc616ljap1ddlc2lvx8-source
source root is source
patching sources
configuring
Info: creating stash file /tmp/nix-build-wkhtmltopdf-0.12.5.drv-0/source/.qmake.stash
building
build flags: -j4 -l4 SHELL=/nix/store/i82x3x0yiijkgyqkzh8ni87gspas0f48-bash-4.4-p23/bin/bash
cd src/lib/ && ( test -e Makefile || /nix/store/334ck8czp3jhfy0ppy55sb6dxf7yxsdv-qtbase-5.12.0-dev/bin/qmake -o Makefile /tmp/nix-build-wkhtmltopdf-0.12.5.drv-0/source/src/lib/lib.pro INSTALLBASE=/nix/store/rc8z502xa3w0n2qm2vmr5d3l73v1lyyd-wkhtmltopdf-0.12.5 ) && make -f Makefile
Project ERROR: Unknown module(s) in QT: xmlpatterns
make: *** [Makefile:47: sub-src-lib-make_first-ordered] Error 3
builder for '/nix/store/7n2cag47gl93wp3f0mv7fiq3dybq2a6l-wkhtmltopdf-0.12.5.drv' failed with exit code 2
```
2019-02-15 04:00:45 -05:00

46 lines
1.4 KiB
Nix

{ stdenv, fetchFromGitHub, qt5, fontconfig, freetype, libpng, zlib, libjpeg
, openssl, libX11, libXext, libXrender }:
stdenv.mkDerivation rec {
version = "0.12.5";
name = "wkhtmltopdf-${version}";
src = fetchFromGitHub {
owner = "wkhtmltopdf";
repo = "wkhtmltopdf";
rev = version;
sha256 = "0i6b6z3f4szspbbi23qr3hv22j9bhmcj7c1jizr7y0ra43mrgws1";
};
buildInputs = [
fontconfig freetype libpng zlib libjpeg openssl
libX11 libXext libXrender
qt5.qtwebkit qt5.qtsvg qt5.qtxmlpatterns
];
prePatch = ''
for f in src/image/image.pro src/pdf/pdf.pro ; do
substituteInPlace $f --replace '$(INSTALL_ROOT)' ""
done
'';
configurePhase = "qmake wkhtmltopdf.pro INSTALLBASE=$out";
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = https://wkhtmltopdf.org/;
description = "Tools for rendering web pages to PDF or images";
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; [ jb55 ];
platforms = with platforms; linux;
};
}