2020-04-24 23:36:52 +00:00
|
|
|
{ qtModule, stdenv, lib, fetchurl
|
|
|
|
, qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel
|
2021-02-13 14:23:35 +00:00
|
|
|
, fontconfig, libwebp, libxml2, libxslt
|
2020-04-24 23:36:52 +00:00
|
|
|
, sqlite, systemd, glib, gst_all_1, cmake
|
2022-02-20 05:27:41 +00:00
|
|
|
, bison, flex, gdb, gperf, perl, pkg-config, python38, ruby
|
2021-08-22 07:53:02 +00:00
|
|
|
, ICU, OpenGL
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
hyphen = stdenv.mkDerivation rec {
|
2021-08-22 07:53:02 +00:00
|
|
|
pname = "hyphen";
|
|
|
|
version = "2.8.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-08-22 07:53:02 +00:00
|
|
|
url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705";
|
|
|
|
};
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
buildInputs = [ perl ];
|
|
|
|
};
|
|
|
|
usingAnnulenWebkitFork = lib.versionAtLeast qtbase.version "5.11.0";
|
|
|
|
in
|
|
|
|
qtModule {
|
2021-05-28 09:39:13 +00:00
|
|
|
pname = "qtwebkit";
|
2020-04-24 23:36:52 +00:00
|
|
|
qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ]
|
2021-08-22 07:53:02 +00:00
|
|
|
++ lib.optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia
|
|
|
|
++ lib.optional usingAnnulenWebkitFork qtwebchannel;
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]
|
2021-08-22 07:53:02 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ ICU OpenGL ]
|
|
|
|
++ lib.optional usingAnnulenWebkitFork hyphen;
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
bison flex gdb gperf perl pkg-config python38 ruby
|
2021-08-22 07:53:02 +00:00
|
|
|
] ++ lib.optional usingAnnulenWebkitFork cmake;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
cmakeFlags = lib.optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
"-DQt5Multimedia_DIR=${lib.getDev qtmultimedia}/lib/cmake/Qt5Multimedia"
|
|
|
|
"-DQt5MultimediaWidgets_DIR=${lib.getDev qtmultimedia}/lib/cmake/Qt5MultimediaWidgets"
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DMACOS_FORCE_SYSTEM_XML_LIBRARIES=OFF"
|
|
|
|
]);
|
|
|
|
|
|
|
|
# QtWebKit overrides qmake's default_pre and default_post features,
|
|
|
|
# so its custom qmake files must be found first at the front of QMAKEPATH.
|
2021-02-05 17:12:51 +00:00
|
|
|
preConfigure = lib.optionalString (!usingAnnulenWebkitFork) ''
|
2020-04-24 23:36:52 +00:00
|
|
|
QMAKEPATH="$PWD/Tools/qmake''${QMAKEPATH:+:}$QMAKEPATH"
|
|
|
|
fixQtBuiltinPaths . '*.pr?'
|
|
|
|
# Fix hydra's "Log limit exceeded"
|
|
|
|
export qmakeFlags="$qmakeFlags CONFIG+=silent"
|
|
|
|
'';
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = [
|
2021-08-22 07:53:02 +00:00
|
|
|
# with gcc7 this warning blows the log over Hydra's limit
|
|
|
|
"-Wno-expansion-to-defined"
|
|
|
|
]
|
|
|
|
# with gcc8, -Wclass-memaccess became part of -Wall and this too exceeds the logging limit
|
|
|
|
++ lib.optional stdenv.cc.isGNU "-Wno-class-memaccess"
|
|
|
|
# with clang this warning blows the log over Hydra's limit
|
|
|
|
++ lib.optional stdenv.isDarwin "-Wno-inconsistent-missing-override"
|
|
|
|
++ lib.optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${lib.getLib systemd}/lib/libudev"'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false; # fails 13 out of 13 tests (ctest)
|
|
|
|
|
|
|
|
# Hack to avoid TMPDIR in RPATHs.
|
2021-08-22 07:53:02 +00:00
|
|
|
preFixup = ''
|
|
|
|
rm -rf "$(pwd)"
|
|
|
|
mkdir "$(pwd)"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
meta = {
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with lib.maintainers; [ abbradar periklis ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|