2018-09-08 21:32:24 +01:00
|
|
|
{ stdenv, fetchFromGitHub, qt5, fontconfig, freetype, libpng, zlib, libjpeg
|
|
|
|
, openssl, libX11, libXext, libXrender }:
|
2012-01-17 11:04:14 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-09-08 21:32:24 +01:00
|
|
|
version = "0.12.5";
|
2014-08-28 22:58:08 +01:00
|
|
|
name = "wkhtmltopdf-${version}";
|
2012-01-17 11:04:14 +00:00
|
|
|
|
2016-04-07 06:12:08 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wkhtmltopdf";
|
|
|
|
repo = "wkhtmltopdf";
|
2017-05-11 06:16:01 +01:00
|
|
|
rev = version;
|
2018-09-08 21:32:24 +01:00
|
|
|
sha256 = "0i6b6z3f4szspbbi23qr3hv22j9bhmcj7c1jizr7y0ra43mrgws1";
|
2012-01-17 11:04:14 +00:00
|
|
|
};
|
|
|
|
|
2017-05-11 06:16:01 +01:00
|
|
|
buildInputs = [
|
2018-09-08 21:32:24 +01:00
|
|
|
fontconfig freetype libpng zlib libjpeg openssl
|
2017-05-11 06:16:01 +01:00
|
|
|
libX11 libXext libXrender
|
2019-02-15 00:29:16 +00:00
|
|
|
qt5.qtwebkit qt5.qtsvg qt5.qtxmlpatterns
|
2017-05-11 06:16:01 +01:00
|
|
|
];
|
2012-01-17 11:04:14 +00:00
|
|
|
|
2017-05-11 06:16:01 +01:00
|
|
|
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";
|
2014-08-28 22:58:08 +01:00
|
|
|
|
2012-01-17 11:04:14 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-10-28 00:20:26 +00:00
|
|
|
meta = with stdenv.lib; {
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = https://wkhtmltopdf.org/;
|
2012-01-17 11:04:14 +00:00
|
|
|
description = "Tools for rendering web pages to PDF or images";
|
2014-08-28 22:58:08 +01:00
|
|
|
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.
|
|
|
|
'';
|
2015-10-28 00:20:26 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ jb55 ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = with platforms; linux;
|
2012-01-17 11:04:14 +00:00
|
|
|
};
|
|
|
|
}
|