Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions pkgs/tools/graphics/wkhtmltopdf/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ mkDerivation, lib, fetchFromGitHub, qtwebkit, qtsvg, qtxmlpatterns
, fontconfig, freetype, libpng, zlib, libjpeg
{ stdenv, lib, fetchFromGitHub, qtwebkit, qtsvg, qtxmlpatterns
, fontconfig, freetype, libpng, zlib, libjpeg, wrapQtAppsHook
, openssl, libX11, libXext, libXrender }:

mkDerivation rec {
stdenv.mkDerivation rec {
version = "0.12.6";
pname = "wkhtmltopdf";

Expand All @@ -13,6 +13,10 @@ mkDerivation rec {
sha256 = "0m2zy986kzcpg0g3bvvm815ap9n5ann5f6bdy7pfj6jv482bm5mg";
};

nativeBuildInputs = [
wrapQtAppsHook
];

buildInputs = [
fontconfig freetype libpng zlib libjpeg openssl
libX11 libXext libXrender
Expand All @@ -25,6 +29,12 @@ mkDerivation rec {
done
'';

# rewrite library path
postInstall = lib.optionalString stdenv.isDarwin ''
install_name_tool -change libwkhtmltox.0.dylib $out/lib/libwkhtmltox.0.dylib $out/bin/wkhtmltopdf
install_name_tool -change libwkhtmltox.0.dylib $out/lib/libwkhtmltox.0.dylib $out/bin/wkhtmltoimage
'';

configurePhase = "qmake wkhtmltopdf.pro INSTALLBASE=$out";

enableParallelBuilding = true;
Expand All @@ -42,6 +52,6 @@ mkDerivation rec {
'';
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jb55 ];
platforms = with platforms; linux;
platforms = platforms.unix;
};
}