2018-05-26 09:05:18 +02:00
|
|
|
{ qtModule, stdenv, lib, fetchurl
|
2018-10-19 11:36:48 +02:00
|
|
|
, qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel
|
2017-02-28 16:37:57 +01:00
|
|
|
, fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt
|
2018-05-26 09:05:18 +02:00
|
|
|
, sqlite, systemd, glib, gst_all_1, cmake
|
2017-02-28 16:37:57 +01:00
|
|
|
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
|
2017-03-26 00:16:51 +01:00
|
|
|
, darwin
|
2017-02-28 16:37:57 +01:00
|
|
|
, flashplayerFix ? false
|
|
|
|
}:
|
|
|
|
|
2018-05-26 09:05:18 +02:00
|
|
|
let
|
|
|
|
inherit (lib) optional optionals getLib;
|
|
|
|
hyphen = stdenv.mkDerivation rec {
|
|
|
|
name = "hyphen-2.8.8";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-${name}.tar.gz";
|
|
|
|
sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705";
|
|
|
|
};
|
2018-07-23 10:57:16 +02:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
2018-05-26 09:05:18 +02:00
|
|
|
buildInputs = [ perl ];
|
|
|
|
};
|
|
|
|
in
|
2017-10-24 13:39:54 +02:00
|
|
|
qtModule {
|
2017-02-28 16:37:57 +01:00
|
|
|
name = "qtwebkit";
|
2018-10-19 11:36:48 +02:00
|
|
|
qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ]
|
|
|
|
++ optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia
|
|
|
|
++ optional (lib.versionAtLeast qtbase.version "5.11.0") qtwebchannel;
|
2017-03-26 00:16:51 +01:00
|
|
|
buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]
|
2018-11-17 21:18:42 +01:00
|
|
|
++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ cf-private OpenGL ])
|
2018-05-26 09:05:18 +02:00
|
|
|
++ optionals (lib.versionAtLeast qtbase.version "5.11.0") [ hyphen ];
|
2017-02-28 16:37:57 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
bison2 flex gdb gperf perl pkgconfig python2 ruby
|
2018-05-26 09:05:18 +02:00
|
|
|
] ++ optionals (lib.versionAtLeast qtbase.version "5.11.0") [ cmake ];
|
|
|
|
|
|
|
|
cmakeFlags = optionals (lib.versionAtLeast qtbase.version "5.11.0") [ "-DPORT=Qt" ];
|
|
|
|
|
2017-03-26 00:16:51 +01:00
|
|
|
__impureHostDeps = optionals (stdenv.isDarwin) [
|
|
|
|
"/usr/lib/libicucore.dylib"
|
|
|
|
];
|
|
|
|
|
2017-10-24 13:39:54 +02: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?'
|
2018-05-06 16:46:55 +02:00
|
|
|
# Fix hydra's "Log limit exceeded"
|
|
|
|
export qmakeFlags="$qmakeFlags CONFIG+=silent"
|
2017-10-24 13:39:54 +02:00
|
|
|
'';
|
2017-05-23 18:12:19 +02:00
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE =
|
2018-05-06 16:46:55 +02:00
|
|
|
# with gcc7 this warning blows the log over Hydra's limit
|
|
|
|
[ "-Wno-expansion-to-defined" ]
|
|
|
|
# with clang this warning blows the log over Hydra's limit
|
|
|
|
++ optional stdenv.isDarwin "-Wno-inconsistent-missing-override"
|
2018-02-17 09:42:24 +01:00
|
|
|
++ optionals flashplayerFix
|
2017-05-23 18:12:19 +02: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 18:11:07 +02:00
|
|
|
|
2018-07-23 10:57:16 +02:00
|
|
|
doCheck = false; # fails 13 out of 13 tests (ctest)
|
|
|
|
|
2017-05-16 18:11:07 +02:00
|
|
|
# Hack to avoid TMPDIR in RPATHs.
|
|
|
|
preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
|
|
|
|
|
2017-03-26 00:16:51 +01:00
|
|
|
meta.maintainers = with stdenv.lib.maintainers; [ abbradar periklis ];
|
2017-02-28 16:37:57 +01:00
|
|
|
}
|