1 { qtModule, stdenv, lib, fetchurl
2 , qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel
3 , fontconfig, libwebp, libxml2, libxslt
4 , sqlite, systemd, glib, gst_all_1, cmake
5 , bison, flex, gdb, gperf, perl, pkg-config, python2, ruby
10 inherit (lib) optional optionals getDev getLib;
11 hyphen = stdenv.mkDerivation rec {
12 name = "hyphen-2.8.8";
14 url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-${name}.tar.gz";
15 sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705";
20 buildInputs = [ perl ];
22 usingAnnulenWebkitFork = lib.versionAtLeast qtbase.version "5.11.0";
26 qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ]
27 ++ optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia
28 ++ optional usingAnnulenWebkitFork qtwebchannel;
29 buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]
30 ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ ICU OpenGL ])
31 ++ optional usingAnnulenWebkitFork hyphen;
33 bison flex gdb gperf perl pkg-config python2 ruby
34 ] ++ optional usingAnnulenWebkitFork cmake;
36 cmakeFlags = optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ]
37 ++ optionals stdenv.isDarwin [
38 "-DQt5Multimedia_DIR=${getDev qtmultimedia}/lib/cmake/Qt5Multimedia"
39 "-DQt5MultimediaWidgets_DIR=${getDev qtmultimedia}/lib/cmake/Qt5MultimediaWidgets"
40 "-DMACOS_FORCE_SYSTEM_XML_LIBRARIES=OFF"
43 # QtWebKit overrides qmake's default_pre and default_post features,
44 # so its custom qmake files must be found first at the front of QMAKEPATH.
45 preConfigure = lib.optionalString (!usingAnnulenWebkitFork) ''
46 QMAKEPATH="$PWD/Tools/qmake''${QMAKEPATH:+:}$QMAKEPATH"
47 fixQtBuiltinPaths . '*.pr?'
48 # Fix hydra's "Log limit exceeded"
49 export qmakeFlags="$qmakeFlags CONFIG+=silent"
52 NIX_CFLAGS_COMPILE = [
53 # with gcc7 this warning blows the log over Hydra's limit
54 "-Wno-expansion-to-defined"
56 # with gcc8, -Wclass-memaccess became part of -Wall and this too exceeds the logging limit
57 ++ optional stdenv.cc.isGNU "-Wno-class-memaccess"
58 # with clang this warning blows the log over Hydra's limit
59 ++ optional stdenv.isDarwin "-Wno-inconsistent-missing-override"
60 ++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"'';
62 doCheck = false; # fails 13 out of 13 tests (ctest)
64 # Hack to avoid TMPDIR in RPATHs.
65 preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" '';
68 maintainers = with lib.maintainers; [ abbradar periklis ];