2017-05-11 06:16:01 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, qt4, fontconfig, freetype, libpng, zlib, libjpeg
|
2014-08-28 22:58:08 +01:00
|
|
|
, openssl, libX11, libXext, libXrender, overrideDerivation }:
|
2012-01-17 11:04:14 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-05-11 06:16:01 +01:00
|
|
|
version = "0.12.4";
|
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;
|
|
|
|
sha256 = "09yzj9ylc6ci4a1qlhz60cgxi1nm9afwjrjxfikf8wwjd3i24vp2";
|
2012-01-17 11:04:14 +00:00
|
|
|
};
|
|
|
|
|
2014-08-28 22:58:08 +01:00
|
|
|
wkQt = overrideDerivation qt4 (deriv: {
|
2016-04-07 06:12:08 +01:00
|
|
|
name = "qt-mod-4.8.7";
|
2015-10-28 00:13:55 +00:00
|
|
|
enableParallelBuilding = true;
|
2016-04-07 06:12:08 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wkhtmltopdf";
|
|
|
|
repo = "qt";
|
|
|
|
rev = "fe194f9dac0b515757392a18f7fc9527c91d45ab"; # From git submodule spec in wkhtml repo.
|
|
|
|
sha256 = "1j2ld2bfacnn3vm2l1870v55sj82bq4y8zkawmlx2y5j63d8vr23";
|
2014-08-28 22:58:08 +01:00
|
|
|
};
|
|
|
|
configureFlags =
|
|
|
|
''
|
2016-04-07 06:12:08 +01:00
|
|
|
-dbus-linked
|
|
|
|
-glib
|
|
|
|
-no-separate-debug-info
|
|
|
|
-openssl-linked
|
|
|
|
-qdbus
|
|
|
|
-v
|
2014-08-28 22:58:08 +01:00
|
|
|
''
|
|
|
|
+ # This is taken from the wkhtml build script that we don't run
|
|
|
|
''
|
2016-04-07 06:12:08 +01:00
|
|
|
-confirm-license
|
2014-08-28 22:58:08 +01:00
|
|
|
-exceptions
|
2016-04-07 06:12:08 +01:00
|
|
|
-fast
|
|
|
|
-graphicssystem raster
|
|
|
|
-iconv
|
|
|
|
-largefile
|
|
|
|
-no-3dnow
|
|
|
|
-no-accessibility
|
|
|
|
-no-audio-backend
|
|
|
|
-no-avx
|
|
|
|
-no-cups
|
|
|
|
-no-dbus
|
|
|
|
-no-declarative
|
|
|
|
-no-glib
|
|
|
|
-no-gstreamer
|
|
|
|
-no-gtkstyle
|
|
|
|
-no-icu
|
|
|
|
-no-javascript-jit
|
2014-08-28 22:58:08 +01:00
|
|
|
-no-libmng
|
|
|
|
-no-libtiff
|
2016-04-07 06:12:08 +01:00
|
|
|
-nomake demos
|
|
|
|
-nomake docs
|
|
|
|
-nomake examples
|
|
|
|
-nomake tests
|
|
|
|
-nomake tools
|
|
|
|
-nomake translations
|
|
|
|
-no-mitshm
|
|
|
|
-no-mmx
|
|
|
|
-no-multimedia
|
|
|
|
-no-nas-sound
|
|
|
|
-no-neon
|
|
|
|
-no-nis
|
|
|
|
-no-opengl
|
|
|
|
-no-openvg
|
|
|
|
-no-pch
|
2014-08-28 22:58:08 +01:00
|
|
|
-no-phonon
|
|
|
|
-no-phonon-backend
|
2016-04-07 06:12:08 +01:00
|
|
|
-no-qt3support
|
|
|
|
-no-rpath
|
|
|
|
-no-scripttools
|
|
|
|
-no-sm
|
2014-08-28 22:58:08 +01:00
|
|
|
-no-sql-ibase
|
|
|
|
-no-sql-mysql
|
|
|
|
-no-sql-odbc
|
|
|
|
-no-sql-psql
|
|
|
|
-no-sql-sqlite
|
|
|
|
-no-sql-sqlite2
|
|
|
|
-no-sse
|
|
|
|
-no-sse2
|
2016-04-07 06:12:08 +01:00
|
|
|
-no-sse3
|
|
|
|
-no-sse4.1
|
|
|
|
-no-sse4.2
|
|
|
|
-no-ssse3
|
|
|
|
-no-stl
|
|
|
|
-no-xcursor
|
|
|
|
-no-xfixes
|
|
|
|
-no-xinerama
|
|
|
|
-no-xinput
|
|
|
|
-no-xkb
|
|
|
|
-no-xrandr
|
|
|
|
-no-xshape
|
|
|
|
-no-xsync
|
|
|
|
-opensource
|
|
|
|
-release
|
|
|
|
-static
|
|
|
|
-system-libjpeg
|
|
|
|
-system-libpng
|
|
|
|
-system-zlib
|
|
|
|
-webkit
|
|
|
|
-xmlpatterns
|
2014-08-28 22:58:08 +01:00
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2017-05-11 06:16:01 +01:00
|
|
|
buildInputs = [
|
|
|
|
wkQt fontconfig freetype libpng zlib libjpeg openssl
|
|
|
|
libX11 libXext libXrender
|
|
|
|
];
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "make-0.12.4-compile.patch";
|
|
|
|
url = "https://github.com/efx/aports/raw/eb9f8e6bb9a488460929db747b15b8fceddd7abd/testing/wkhtmltopdf/10-patch1.patch";
|
|
|
|
sha256 = "1c136jz0klr2rmhmy13gdbgsgkpjfdp2sif8bnw8d23mr9pym3s1";
|
|
|
|
})
|
|
|
|
];
|
2015-10-28 00:20:26 +00:00
|
|
|
|
2017-05-11 06:16:01 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|