2017-10-24 12:39:54 +01:00
|
|
|
{ qtModule, stdenv, lib
|
|
|
|
, qtbase, qtdeclarative, qtlocation, qtsensors
|
2017-02-28 15:37:57 +00:00
|
|
|
, fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt
|
|
|
|
, sqlite, systemd, glib, gst_all_1
|
|
|
|
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
|
2017-03-25 23:16:51 +00:00
|
|
|
, darwin
|
2017-02-28 15:37:57 +00:00
|
|
|
, substituteAll
|
|
|
|
, flashplayerFix ? false
|
|
|
|
}:
|
|
|
|
|
2017-05-23 17:12:19 +01:00
|
|
|
let inherit (lib) optional optionals getLib; in
|
2017-02-28 15:37:57 +00:00
|
|
|
|
2017-10-24 12:39:54 +01:00
|
|
|
qtModule {
|
2017-02-28 15:37:57 +00:00
|
|
|
name = "qtwebkit";
|
2017-10-24 12:39:54 +01:00
|
|
|
qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ];
|
2017-03-25 23:16:51 +00:00
|
|
|
buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]
|
|
|
|
++ optionals (stdenv.isDarwin) (with darwin.apple_sdk.frameworks; [ OpenGL ]);
|
2017-02-28 15:37:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
bison2 flex gdb gperf perl pkgconfig python2 ruby
|
|
|
|
];
|
2017-03-25 23:16:51 +00:00
|
|
|
|
|
|
|
__impureHostDeps = optionals (stdenv.isDarwin) [
|
|
|
|
"/usr/lib/libicucore.dylib"
|
|
|
|
];
|
|
|
|
|
2017-10-24 12:39:54 +01:00
|
|
|
# QtWebKit overrides qmake's default_pre and default_post features,
|
|
|
|
# so its custom qmake files must be found first at the front of QMAKEPATH.
|
|
|
|
preConfigure = ''
|
|
|
|
QMAKEPATH="$PWD/Tools/qmake''${QMAKEPATH:+:}$QMAKEPATH"
|
|
|
|
fixQtBuiltinPaths . '*.pr?'
|
|
|
|
'';
|
2017-05-23 17:12:19 +01:00
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE =
|
2018-02-17 08:42:24 +00:00
|
|
|
[ "-Wno-expansion-to-defined" ] # with gcc7 this warning blows the log over Hydra's limit
|
|
|
|
++ optionals flashplayerFix
|
2017-05-23 17:12:19 +01:00
|
|
|
[
|
|
|
|
''-DNIXPKGS_LIBGTK2="${getLib gtk2}/lib/libgtk-x11-2.0"''
|
|
|
|
''-DNIXPKGS_LIBGDK2="${getLib gdk_pixbuf}/lib/libgdk-x11-2.0"''
|
|
|
|
]
|
|
|
|
++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"'';
|
2017-05-16 17:11:07 +01:00
|
|
|
|
|
|
|
# Hack to avoid TMPDIR in RPATHs.
|
|
|
|
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
|
|
|
|
|
2017-03-25 23:16:51 +00:00
|
|
|
meta.maintainers = with stdenv.lib.maintainers; [ abbradar periklis ];
|
2017-02-28 15:37:57 +00:00
|
|
|
}
|