uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
7
pkgs/development/libraries/qt-5/modules/qt3d.nix
Normal file
7
pkgs/development/libraries/qt-5/modules/qt3d.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtbase, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qt3d";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
380
pkgs/development/libraries/qt-5/modules/qtbase.nix
Normal file
380
pkgs/development/libraries/qt-5/modules/qtbase.nix
Normal file
|
|
@ -0,0 +1,380 @@
|
|||
{ stdenv, lib
|
||||
, src, patches, version, qtCompatVersion
|
||||
|
||||
, coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3
|
||||
, which
|
||||
# darwin support
|
||||
, libiconv, libobjc, xcbuild, AGL, AppKit, ApplicationServices, Carbon, Cocoa, CoreAudio, CoreBluetooth
|
||||
, CoreLocation, CoreServices, DiskArbitration, Foundation, OpenGL, MetalKit, IOKit
|
||||
|
||||
, dbus, fontconfig, freetype, glib, harfbuzz, icu, libdrm, libX11, libXcomposite
|
||||
, libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng , libxcb
|
||||
, libxkbcommon, libxml2, libxslt, openssl, pcre16, pcre2, sqlite, udev, xcbutil
|
||||
, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm , zlib, at-spi2-core
|
||||
|
||||
# optional dependencies
|
||||
, cups ? null, libmysqlclient ? null, postgresql ? null
|
||||
, withGtk3 ? false, dconf ? null, gtk3 ? null
|
||||
|
||||
# options
|
||||
, libGLSupported ? !stdenv.isDarwin
|
||||
, libGL
|
||||
, buildExamples ? false
|
||||
, buildTests ? false
|
||||
, debug ? false
|
||||
, developerBuild ? false
|
||||
, decryptSslTraffic ? false
|
||||
}:
|
||||
|
||||
assert withGtk3 -> dconf != null;
|
||||
assert withGtk3 -> gtk3 != null;
|
||||
|
||||
let
|
||||
compareVersion = v: builtins.compareVersions version v;
|
||||
qmakeCacheName = if compareVersion "5.12.4" < 0 then ".qmake.cache" else ".qmake.stash";
|
||||
debugSymbols = debug || developerBuild;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "qtbase";
|
||||
inherit qtCompatVersion src version;
|
||||
debug = debugSymbols;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
libxml2 libxslt openssl sqlite zlib
|
||||
|
||||
# Text rendering
|
||||
harfbuzz icu
|
||||
|
||||
# Image formats
|
||||
libjpeg libpng
|
||||
(if compareVersion "5.9.0" < 0 then pcre16 else pcre2)
|
||||
] ++ (
|
||||
if stdenv.isDarwin then [
|
||||
# TODO: move to buildInputs, this should not be propagated.
|
||||
AGL AppKit ApplicationServices Carbon Cocoa CoreAudio CoreBluetooth
|
||||
CoreLocation CoreServices DiskArbitration Foundation OpenGL
|
||||
libobjc libiconv MetalKit IOKit
|
||||
] else [
|
||||
dbus glib udev
|
||||
|
||||
# Text rendering
|
||||
fontconfig freetype
|
||||
|
||||
libdrm
|
||||
|
||||
# X11 libs
|
||||
libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil
|
||||
xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm
|
||||
] ++ lib.optional libGLSupported libGL
|
||||
);
|
||||
|
||||
buildInputs = [ python3 at-spi2-core ]
|
||||
++ lib.optionals (!stdenv.isDarwin)
|
||||
(
|
||||
[ libinput ]
|
||||
++ lib.optional withGtk3 gtk3
|
||||
)
|
||||
++ lib.optional developerBuild gdb
|
||||
++ lib.optional (cups != null) cups
|
||||
++ lib.optional (libmysqlclient != null) libmysqlclient
|
||||
++ lib.optional (postgresql != null) postgresql;
|
||||
|
||||
nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which ]
|
||||
++ lib.optionals stdenv.isDarwin [ xcbuild ];
|
||||
|
||||
propagatedNativeBuildInputs = [ lndir ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
|
||||
inherit patches;
|
||||
|
||||
fix_qt_builtin_paths = ../hooks/fix-qt-builtin-paths.sh;
|
||||
fix_qt_module_paths = ../hooks/fix-qt-module-paths.sh;
|
||||
preHook = ''
|
||||
. "$fix_qt_builtin_paths"
|
||||
. "$fix_qt_module_paths"
|
||||
. ${../hooks/move-qt-dev-tools.sh}
|
||||
. ${../hooks/fix-qmake-libtool.sh}
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
for prf in qml_plugin.prf qt_plugin.prf qt_docs.prf qml_module.prf create_cmake.prf; do
|
||||
substituteInPlace "mkspecs/features/$prf" \
|
||||
--subst-var qtPluginPrefix \
|
||||
--subst-var qtQmlPrefix \
|
||||
--subst-var qtDocPrefix
|
||||
done
|
||||
|
||||
substituteInPlace configure --replace /bin/pwd pwd
|
||||
substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
|
||||
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i mkspecs/*/*.conf
|
||||
|
||||
sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5Config.cmake.in
|
||||
sed -i '/PATHS.*NO_DEFAULT_PATH/ d' src/corelib/Qt5CoreMacros.cmake
|
||||
sed -i 's/NO_DEFAULT_PATH//' src/gui/Qt5GuiConfigExtras.cmake.in
|
||||
sed -i '/PATHS.*NO_DEFAULT_PATH/ d' mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
|
||||
|
||||
# https://bugs.gentoo.org/803470
|
||||
sed -i 's/-lpthread/-pthread/' mkspecs/common/linux.conf src/corelib/configure.json
|
||||
'' + lib.optionalString (compareVersion "5.15.0" >= 0) ''
|
||||
patchShebangs ./bin
|
||||
'' + (
|
||||
if stdenv.isDarwin then ''
|
||||
sed -i \
|
||||
-e 's|/usr/bin/xcode-select|xcode-select|' \
|
||||
-e 's|/usr/bin/xcrun|xcrun|' \
|
||||
-e 's|/usr/bin/xcodebuild|xcodebuild|' \
|
||||
-e 's|QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`|QMAKE_CXX="clang++"\nQMAKE_CONF_COMPILER="clang++"|' \
|
||||
./configure
|
||||
substituteInPlace ./mkspecs/common/mac.conf \
|
||||
--replace "/System/Library/Frameworks/OpenGL.framework/" "${OpenGL}/Library/Frameworks/OpenGL.framework/" \
|
||||
--replace "/System/Library/Frameworks/AGL.framework/" "${AGL}/Library/Frameworks/AGL.framework/"
|
||||
'' else lib.optionalString libGLSupported ''
|
||||
sed -i mkspecs/common/linux.conf \
|
||||
-e "/^QMAKE_INCDIR_OPENGL/ s|$|${libGL.dev or libGL}/include|" \
|
||||
-e "/^QMAKE_LIBDIR_OPENGL/ s|$|${libGL.out}/lib|"
|
||||
'' + lib.optionalString (stdenv.hostPlatform.isx86_32 && stdenv.cc.isGNU) ''
|
||||
sed -i mkspecs/common/gcc-base-unix.conf \
|
||||
-e "/^QMAKE_LFLAGS_SHLIB/ s/-shared/-shared -static-libgcc/"
|
||||
''
|
||||
);
|
||||
|
||||
qtPluginPrefix = "lib/qt-${qtCompatVersion}/plugins";
|
||||
qtQmlPrefix = "lib/qt-${qtCompatVersion}/qml";
|
||||
qtDocPrefix = "share/doc/qt-${qtCompatVersion}";
|
||||
|
||||
setOutputFlags = false;
|
||||
preConfigure = ''
|
||||
export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||
${lib.optionalString (compareVersion "5.9.0" < 0) ''
|
||||
# We need to set LD to CXX or otherwise we get nasty compile errors
|
||||
export LD=$CXX
|
||||
''}
|
||||
|
||||
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\""
|
||||
|
||||
# paralellize compilation of qtmake, which happens within ./configure
|
||||
export MAKEFLAGS+=" -j$NIX_BUILD_CORES"
|
||||
'' + lib.optionalString (compareVersion "5.15.0" >= 0) ''
|
||||
./bin/syncqt.pl -version $version
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
qmakeCacheInjectNixOutputs() {
|
||||
local cache="$1/${qmakeCacheName}"
|
||||
echo "qmakeCacheInjectNixOutputs: $cache"
|
||||
if ! [ -f "$cache" ]; then
|
||||
echo >&2 "qmakeCacheInjectNixOutputs: WARNING: $cache does not exist"
|
||||
fi
|
||||
cat >>"$cache" <<EOF
|
||||
NIX_OUTPUT_BIN = $bin
|
||||
NIX_OUTPUT_DEV = $dev
|
||||
NIX_OUTPUT_OUT = $out
|
||||
NIX_OUTPUT_DOC = $dev/$qtDocPrefix
|
||||
NIX_OUTPUT_QML = $bin/$qtQmlPrefix
|
||||
NIX_OUTPUT_PLUGIN = $bin/$qtPluginPrefix
|
||||
EOF
|
||||
}
|
||||
|
||||
find . -name '.qmake.conf' | while read conf; do
|
||||
qmakeCacheInjectNixOutputs "$(dirname $conf)"
|
||||
done
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = toString ([
|
||||
"-Wno-error=sign-compare" # freetype-2.5.4 changed signedness of some struct fields
|
||||
''-DNIXPKGS_QTCOMPOSE="${libX11.out}/share/X11/locale"''
|
||||
''-D${if compareVersion "5.11.0" >= 0 then "LIBRESOLV_SO" else "NIXPKGS_LIBRESOLV"}="${stdenv.cc.libc.out}/lib/libresolv"''
|
||||
''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"''
|
||||
] ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
|
||||
++ lib.optional stdenv.isLinux "-DUSE_X11"
|
||||
++ lib.optionals (stdenv.hostPlatform.system == "x86_64-darwin") [
|
||||
# ignore "is only available on macOS 10.12.2 or newer" in obj-c code
|
||||
"-Wno-error=unguarded-availability"
|
||||
]
|
||||
++ lib.optionals withGtk3 [
|
||||
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
|
||||
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
|
||||
]
|
||||
++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC");
|
||||
|
||||
prefixKey = "-prefix ";
|
||||
|
||||
# PostgreSQL autodetection fails sporadically because Qt omits the "-lpq" flag
|
||||
# if dependency paths contain the string "pq", which can occur in the hash.
|
||||
# To prevent these failures, we need to override PostgreSQL detection.
|
||||
PSQL_LIBS = lib.optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq";
|
||||
|
||||
# TODO Remove obsolete and useless flags once the build will be totally mastered
|
||||
configureFlags = [
|
||||
"-plugindir $(out)/$(qtPluginPrefix)"
|
||||
"-qmldir $(out)/$(qtQmlPrefix)"
|
||||
"-docdir $(out)/$(qtDocPrefix)"
|
||||
|
||||
"-verbose"
|
||||
"-confirm-license"
|
||||
"-opensource"
|
||||
|
||||
"-release"
|
||||
"-shared"
|
||||
"-accessibility"
|
||||
"-optimized-qmake"
|
||||
"-strip"
|
||||
"-system-proxies"
|
||||
"-pkg-config"
|
||||
|
||||
"-gui"
|
||||
"-widgets"
|
||||
"-opengl desktop"
|
||||
"-icu"
|
||||
"-L" "${icu.out}/lib"
|
||||
"-I" "${icu.dev}/include"
|
||||
"-pch"
|
||||
] ++ lib.optional debugSymbols "-debug"
|
||||
++ lib.optionals (compareVersion "5.11.0" < 0) [
|
||||
"-qml-debug"
|
||||
] ++ lib.optionals (compareVersion "5.9.0" < 0) [
|
||||
"-c++11"
|
||||
"-no-reduce-relocations"
|
||||
] ++ lib.optionals developerBuild [
|
||||
"-developer-build"
|
||||
"-no-warnings-are-errors"
|
||||
] ++ (if (!stdenv.hostPlatform.isx86_64) then [
|
||||
"-no-sse2"
|
||||
] else lib.optionals (compareVersion "5.9.0" >= 0) [
|
||||
"-sse2"
|
||||
"${lib.optionalString (!stdenv.hostPlatform.sse3Support) "-no"}-sse3"
|
||||
"${lib.optionalString (!stdenv.hostPlatform.ssse3Support) "-no"}-ssse3"
|
||||
"${lib.optionalString (!stdenv.hostPlatform.sse4_1Support) "-no"}-sse4.1"
|
||||
"${lib.optionalString (!stdenv.hostPlatform.sse4_2Support) "-no"}-sse4.2"
|
||||
"${lib.optionalString (!stdenv.hostPlatform.avxSupport) "-no"}-avx"
|
||||
"${lib.optionalString (!stdenv.hostPlatform.avx2Support) "-no"}-avx2"
|
||||
]
|
||||
) ++ [
|
||||
"-no-mips_dsp"
|
||||
"-no-mips_dspr2"
|
||||
] ++ [
|
||||
"-system-zlib"
|
||||
"-L" "${zlib.out}/lib"
|
||||
"-I" "${zlib.dev}/include"
|
||||
"-system-libjpeg"
|
||||
"-L" "${libjpeg.out}/lib"
|
||||
"-I" "${libjpeg.dev}/include"
|
||||
"-system-harfbuzz"
|
||||
"-L" "${harfbuzz.out}/lib"
|
||||
"-I" "${harfbuzz.dev}/include"
|
||||
"-system-pcre"
|
||||
"-openssl-linked"
|
||||
"-L" "${lib.getLib openssl}/lib"
|
||||
"-I" "${openssl.dev}/include"
|
||||
"-system-sqlite"
|
||||
''-${if libmysqlclient != null then "plugin" else "no"}-sql-mysql''
|
||||
''-${if postgresql != null then "plugin" else "no"}-sql-psql''
|
||||
|
||||
"-make libs"
|
||||
"-make tools"
|
||||
''-${lib.optionalString (!buildExamples) "no"}make examples''
|
||||
''-${lib.optionalString (!buildTests) "no"}make tests''
|
||||
] ++ lib.optional (compareVersion "5.15.0" < 0) "-v"
|
||||
++ (
|
||||
if stdenv.isDarwin then [
|
||||
"-platform macx-clang"
|
||||
"-no-fontconfig"
|
||||
"-qt-freetype"
|
||||
"-qt-libpng"
|
||||
"-no-framework"
|
||||
] else [
|
||||
"-${lib.optionalString (compareVersion "5.9.0" < 0) "no-"}rpath"
|
||||
] ++ lib.optional (compareVersion "5.15.0" < 0) "-system-xcb"
|
||||
++ [
|
||||
"-xcb"
|
||||
"-qpa xcb"
|
||||
"-L" "${libX11.out}/lib"
|
||||
"-I" "${libX11.out}/include"
|
||||
"-L" "${libXext.out}/lib"
|
||||
"-I" "${libXext.out}/include"
|
||||
"-L" "${libXrender.out}/lib"
|
||||
"-I" "${libXrender.out}/include"
|
||||
|
||||
"-libinput"
|
||||
|
||||
''-${lib.optionalString (cups == null) "no-"}cups''
|
||||
"-dbus-linked"
|
||||
"-glib"
|
||||
] ++ lib.optional (compareVersion "5.15.0" < 0) "-system-libjpeg"
|
||||
++ [
|
||||
"-system-libpng"
|
||||
] ++ lib.optional withGtk3 "-gtk"
|
||||
++ lib.optional (compareVersion "5.9.0" >= 0) "-inotify"
|
||||
++ lib.optionals (compareVersion "5.10.0" >= 0) [
|
||||
# Without these, Qt stops working on kernels < 3.17. See:
|
||||
# https://github.com/NixOS/nixpkgs/issues/38832
|
||||
"-no-feature-renameat2"
|
||||
"-no-feature-getentropy"
|
||||
] ++ lib.optionals (compareVersion "5.12.1" < 0) [
|
||||
# use -xkbcommon and -xkbcommon-evdev for versions before 5.12.1
|
||||
"-system-xkbcommon"
|
||||
"-xkbcommon-evdev"
|
||||
] ++ lib.optionals (cups != null) [
|
||||
"-L" "${cups.lib}/lib"
|
||||
"-I" "${cups.dev}/include"
|
||||
] ++ lib.optionals (libmysqlclient != null) [
|
||||
"-L" "${libmysqlclient}/lib"
|
||||
"-I" "${libmysqlclient}/include"
|
||||
]
|
||||
);
|
||||
|
||||
# Move selected outputs.
|
||||
postInstall = ''
|
||||
moveToOutput "mkspecs" "$dev"
|
||||
'';
|
||||
|
||||
devTools = [
|
||||
"bin/fixqt4headers.pl"
|
||||
"bin/moc"
|
||||
"bin/qdbuscpp2xml"
|
||||
"bin/qdbusxml2cpp"
|
||||
"bin/qlalr"
|
||||
"bin/qmake"
|
||||
"bin/rcc"
|
||||
"bin/syncqt.pl"
|
||||
"bin/uic"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
# Don't retain build-time dependencies like gdb.
|
||||
sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
|
||||
fixQtModulePaths "''${!outputDev}/mkspecs/modules"
|
||||
fixQtBuiltinPaths "''${!outputDev}" '*.pr?'
|
||||
|
||||
# Move development tools to $dev
|
||||
moveQtDevTools
|
||||
moveToOutput bin "$dev"
|
||||
|
||||
# fixup .pc file (where to find 'moc' etc.)
|
||||
sed -i "$dev/lib/pkgconfig/Qt5Core.pc" \
|
||||
-e "/^host_bins=/ c host_bins=$dev/bin"
|
||||
'';
|
||||
|
||||
dontStrip = debugSymbols;
|
||||
|
||||
setupHook = ../hooks/qtbase-setup-hook.sh;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.qt.io/";
|
||||
description = "A cross-platform application framework for C++";
|
||||
license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ];
|
||||
maintainers = with maintainers; [ qknight ttuegel periklis bkchr ];
|
||||
platforms = platforms.unix;
|
||||
# Qt5 is broken on aarch64-darwin
|
||||
# the build ends up with the following error:
|
||||
# error: unknown target CPU 'armv8.3-a+crypto+sha2+aes+crc+fp16+lse+simd+ras+rdm+rcpc'
|
||||
# note: valid target CPU values are: nocona, core2, penryn, ..., znver1, znver2, x86-64
|
||||
# it seems the qmake/cmake passes x86_64 as preferred architecture somewhere
|
||||
broken = stdenv.isDarwin && stdenv.isAarch64;
|
||||
};
|
||||
|
||||
}
|
||||
7
pkgs/development/libraries/qt-5/modules/qtcharts.nix
Normal file
7
pkgs/development/libraries/qt-5/modules/qtcharts.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtbase, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtcharts";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{ qtModule, lib, stdenv, qtbase, qtdeclarative, bluez }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtconnectivity";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
buildInputs = lib.optional stdenv.isLinux bluez;
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
24
pkgs/development/libraries/qt-5/modules/qtdeclarative.nix
Normal file
24
pkgs/development/libraries/qt-5/modules/qtdeclarative.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ qtModule, lib, python3, qtbase, qtsvg }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtdeclarative";
|
||||
qtInputs = [ qtbase qtsvg ];
|
||||
nativeBuildInputs = [ python3 ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
preConfigure = ''
|
||||
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QML2_IMPORT_PREFIX=\"$qtQmlPrefix\""
|
||||
'';
|
||||
configureFlags = lib.optionals (lib.versionAtLeast qtbase.version "5.11.0") [ "-qml-debug" ];
|
||||
devTools = [
|
||||
"bin/qml"
|
||||
"bin/qmlcachegen"
|
||||
"bin/qmleasing"
|
||||
"bin/qmlimportscanner"
|
||||
"bin/qmllint"
|
||||
"bin/qmlmin"
|
||||
"bin/qmlplugindump"
|
||||
"bin/qmlprofiler"
|
||||
"bin/qmlscene"
|
||||
"bin/qmltestrunner"
|
||||
];
|
||||
}
|
||||
7
pkgs/development/libraries/qt-5/modules/qtdoc.nix
Normal file
7
pkgs/development/libraries/qt-5/modules/qtdoc.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtdoc";
|
||||
qtInputs = [ qtdeclarative ];
|
||||
outputs = [ "out" ];
|
||||
}
|
||||
10
pkgs/development/libraries/qt-5/modules/qtgamepad.nix
Normal file
10
pkgs/development/libraries/qt-5/modules/qtgamepad.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ lib, stdenv, qtModule, qtbase, qtdeclarative, GameController, pkg-config }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtgamepad";
|
||||
qtInputs = [ qtbase qtdeclarative ]
|
||||
++ lib.optional stdenv.isDarwin GameController;
|
||||
buildInputs = [ ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtgraphicaleffects";
|
||||
qtInputs = [ qtdeclarative ];
|
||||
outputs = [ "out" "dev" ];
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtbase, libtiff }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtimageformats";
|
||||
qtInputs = [ qtbase ];
|
||||
propagatedBuildInputs = [ libtiff ];
|
||||
}
|
||||
13
pkgs/development/libraries/qt-5/modules/qtlocation.nix
Normal file
13
pkgs/development/libraries/qt-5/modules/qtlocation.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ lib, stdenv, qtModule, qtbase, qtmultimedia }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtlocation";
|
||||
qtInputs = [ qtbase qtmultimedia ];
|
||||
outputs = [ "bin" "out" "dev" ];
|
||||
qmakeFlags = lib.optional stdenv.isDarwin [
|
||||
# boost uses std::auto_ptr which has been disabled in clang with libcxx
|
||||
# This flag re-enables this feature
|
||||
# https://libcxx.llvm.org/docs/UsingLibcxx.html#c-17-specific-configuration-macros
|
||||
"QMAKE_CXXFLAGS+=-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR"
|
||||
];
|
||||
}
|
||||
10
pkgs/development/libraries/qt-5/modules/qtmacextras.nix
Normal file
10
pkgs/development/libraries/qt-5/modules/qtmacextras.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ lib, qtModule, qtbase }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtmacextras";
|
||||
qtInputs = [ qtbase ];
|
||||
meta = with lib; {
|
||||
maintainers = with maintainers; [ periklis ];
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
}
|
||||
25
pkgs/development/libraries/qt-5/modules/qtmultimedia.nix
Normal file
25
pkgs/development/libraries/qt-5/modules/qtmultimedia.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ qtModule
|
||||
, lib
|
||||
, stdenv
|
||||
, qtbase
|
||||
, qtdeclarative
|
||||
, pkg-config
|
||||
, alsa-lib
|
||||
, gstreamer
|
||||
, gst-plugins-base
|
||||
, libpulseaudio
|
||||
, wayland
|
||||
}:
|
||||
|
||||
qtModule {
|
||||
pname = "qtmultimedia";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ gstreamer gst-plugins-base ]
|
||||
# https://github.com/NixOS/nixpkgs/pull/169336 regarding libpulseaudio
|
||||
++ lib.optionals stdenv.isLinux [ libpulseaudio alsa-lib ]
|
||||
++ lib.optional (lib.versionAtLeast qtbase.version "5.14.0" && stdenv.isLinux) wayland;
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
qmakeFlags = [ "GST_VERSION=1.0" ];
|
||||
NIX_LDFLAGS = lib.optionalString (stdenv.isDarwin) "-lobjc";
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{ qtModule, qtbase }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtnetworkauth";
|
||||
qtInputs = [ qtbase ];
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{ qtModule, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtquickcontrols";
|
||||
qtInputs = [ qtdeclarative ];
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtquickcontrols2";
|
||||
qtInputs = [ qtdeclarative ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
6
pkgs/development/libraries/qt-5/modules/qtscript.nix
Normal file
6
pkgs/development/libraries/qt-5/modules/qtscript.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ qtModule, qtbase, qttools }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtscript";
|
||||
qtInputs = [ qtbase qttools ];
|
||||
}
|
||||
7
pkgs/development/libraries/qt-5/modules/qtscxml.nix
Normal file
7
pkgs/development/libraries/qt-5/modules/qtscxml.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtbase, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtscxml";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
7
pkgs/development/libraries/qt-5/modules/qtsensors.nix
Normal file
7
pkgs/development/libraries/qt-5/modules/qtsensors.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtbase, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtsensors";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
6
pkgs/development/libraries/qt-5/modules/qtserialbus.nix
Normal file
6
pkgs/development/libraries/qt-5/modules/qtserialbus.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ qtModule, qtbase, qtserialport }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtserialbus";
|
||||
qtInputs = [ qtbase qtserialport ];
|
||||
}
|
||||
7
pkgs/development/libraries/qt-5/modules/qtserialport.nix
Normal file
7
pkgs/development/libraries/qt-5/modules/qtserialport.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, stdenv, lib, qtbase, systemd }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtserialport";
|
||||
qtInputs = [ qtbase ];
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isLinux "-DNIXPKGS_LIBUDEV=\"${lib.getLib systemd}/lib/libudev\"";
|
||||
}
|
||||
9
pkgs/development/libraries/qt-5/modules/qtspeech.nix
Normal file
9
pkgs/development/libraries/qt-5/modules/qtspeech.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ qtModule, speechd, pkg-config }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtspeech";
|
||||
qtInputs = [ ];
|
||||
buildInputs = [ speechd ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
outputs = [ "out" "dev" ];
|
||||
}
|
||||
7
pkgs/development/libraries/qt-5/modules/qtsvg.nix
Normal file
7
pkgs/development/libraries/qt-5/modules/qtsvg.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtbase }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtsvg";
|
||||
qtInputs = [ qtbase ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
42
pkgs/development/libraries/qt-5/modules/qttools.nix
Normal file
42
pkgs/development/libraries/qt-5/modules/qttools.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ qtModule, stdenv, lib, qtbase, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qttools";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
|
||||
# fixQtBuiltinPaths overwrites a builtin path we should keep
|
||||
postPatch = ''
|
||||
sed -i "src/linguist/linguist.pro" \
|
||||
-e '/^cmake_linguist_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${lib.getDev qtbase}|'
|
||||
sed -i "src/qtattributionsscanner/qtattributionsscanner.pro" \
|
||||
-e '/^cmake_qattributionsscanner_config_version_file.input =/ s|$$\[QT_HOST_DATA.*\]|${lib.getDev qtbase}|'
|
||||
'';
|
||||
|
||||
devTools = [
|
||||
"bin/qcollectiongenerator"
|
||||
"bin/linguist"
|
||||
"bin/assistant"
|
||||
"bin/qdoc"
|
||||
"bin/lconvert"
|
||||
"bin/designer"
|
||||
"bin/qtattributionsscanner"
|
||||
"bin/lrelease"
|
||||
"bin/lrelease-pro"
|
||||
"bin/pixeltool"
|
||||
"bin/lupdate"
|
||||
"bin/lupdate-pro"
|
||||
"bin/qtdiag"
|
||||
"bin/qhelpgenerator"
|
||||
"bin/qtplugininfo"
|
||||
"bin/qthelpconverter"
|
||||
"bin/lprodump"
|
||||
"bin/qdistancefieldgenerator"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"bin/macdeployqt"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"'';
|
||||
|
||||
setupHook = ../hooks/qttools-setup-hook.sh;
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{ qtModule, qttools }:
|
||||
|
||||
qtModule {
|
||||
pname = "qttranslations";
|
||||
qtInputs = [ qttools ];
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{ qtModule, qtbase, qtdeclarative, qtsvg, hunspell }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtvirtualkeyboard";
|
||||
qtInputs = [ qtbase qtdeclarative qtsvg hunspell ];
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
Ensure that the correct `app_id` for Wayland is set. The upstream implementation
|
||||
uses `QFileInfo::baseName()`[1] which strips everything away after the first dot.
|
||||
This means that `.foo-wrapped` has an empty `app_id` because `baseName` returns
|
||||
an empty string in this case.
|
||||
|
||||
The patch basically checks whether the program has the form `.foo-wrapped` (i.e. got
|
||||
wrapped by `makeWrapper`) and if that's the case, `foo` will be the correct `app_id`.
|
||||
|
||||
[1] https://doc.qt.io/qt-5/qfileinfo.html#baseName
|
||||
|
||||
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
|
||||
index ba881cb..b3fd031 100644
|
||||
--- a/src/client/qwaylandwindow.cpp
|
||||
+++ b/src/client/qwaylandwindow.cpp
|
||||
@@ -167,7 +167,20 @@ void QWaylandWindow::initWindow()
|
||||
Qt::SkipEmptyParts);
|
||||
|
||||
if (domainName.isEmpty()) {
|
||||
- mShellSurface->setAppId(fi.baseName());
|
||||
+ auto baseName = fi.baseName();
|
||||
+ if (baseName.isEmpty()) {
|
||||
+ auto fileName = fi.fileName();
|
||||
+ if (fileName.endsWith("-wrapped") && fileName.startsWith(".")) {
|
||||
+ do {
|
||||
+ auto len = fileName.length();
|
||||
+ fileName = fileName.right(len - 1);
|
||||
+ fileName = fileName.left(len - 9);
|
||||
+ } while (fileName.endsWith("-wrapped") && fileName.startsWith("."));
|
||||
+ mShellSurface->setAppId(fileName);
|
||||
+ }
|
||||
+ } else {
|
||||
+ mShellSurface->setAppId(baseName);
|
||||
+ }
|
||||
} else {
|
||||
QString appId;
|
||||
for (int i = 0; i < domainName.count(); ++i)
|
||||
15
pkgs/development/libraries/qt-5/modules/qtwayland.nix
Normal file
15
pkgs/development/libraries/qt-5/modules/qtwayland.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ qtModule, qtbase, qtquickcontrols, wayland, pkg-config }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtwayland";
|
||||
qtInputs = [ qtbase qtquickcontrols ];
|
||||
buildInputs = [ wayland ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
patches = [
|
||||
# NixOS-specific, ensure that app_id is correctly determined for
|
||||
# wrapped executables from `wrapQtAppsHook` (see comment in patch for further
|
||||
# context). Beware: shared among different Qt5 versions.
|
||||
./qtwayland-app_id.patch
|
||||
];
|
||||
}
|
||||
8
pkgs/development/libraries/qt-5/modules/qtwebchannel.nix
Normal file
8
pkgs/development/libraries/qt-5/modules/qtwebchannel.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ qtModule, qtbase, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtwebchannel";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
|
||||
267
pkgs/development/libraries/qt-5/modules/qtwebengine.nix
Normal file
267
pkgs/development/libraries/qt-5/modules/qtwebengine.nix
Normal file
|
|
@ -0,0 +1,267 @@
|
|||
{ qtModule
|
||||
, qtdeclarative, qtquickcontrols, qtlocation, qtwebchannel
|
||||
|
||||
, bison, flex, git, gperf, ninja, pkg-config, python2, which
|
||||
, nodejs, qtbase, perl
|
||||
|
||||
, xorg, libXcursor, libXScrnSaver, libXrandr, libXtst
|
||||
, fontconfig, freetype, harfbuzz, icu, dbus, libdrm
|
||||
, zlib, minizip, libjpeg, libpng, libtiff, libwebp, libopus
|
||||
, jsoncpp, protobuf, libvpx, srtp, snappy, nss, libevent
|
||||
, alsa-lib
|
||||
, libcap
|
||||
, pciutils
|
||||
, systemd
|
||||
, enableProprietaryCodecs ? true
|
||||
, gn
|
||||
, cctools, libobjc, libunwind, sandbox, xnu
|
||||
, ApplicationServices, AVFoundation, Foundation, ForceFeedback, GameController, AppKit
|
||||
, ImageCaptureCore, CoreBluetooth, IOBluetooth, CoreWLAN, Quartz, Cocoa, LocalAuthentication
|
||||
, cups, openbsm, runCommand, xcbuild, writeScriptBin
|
||||
, ffmpeg_4 ? null
|
||||
, lib, stdenv, fetchpatch
|
||||
, version ? null
|
||||
, qtCompatVersion
|
||||
, pipewireSupport ? stdenv.isLinux
|
||||
, pipewire_0_2
|
||||
}:
|
||||
|
||||
qtModule {
|
||||
pname = "qtwebengine";
|
||||
qtInputs = [ qtdeclarative qtquickcontrols qtlocation qtwebchannel ];
|
||||
nativeBuildInputs = [
|
||||
bison flex git gperf ninja pkg-config python2 which gn nodejs
|
||||
] ++ lib.optional stdenv.isDarwin xcbuild;
|
||||
doCheck = true;
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# Don’t use the gn setup hook
|
||||
dontUseGnConfigure = true;
|
||||
|
||||
# ninja builds some components with -Wno-format,
|
||||
# which cannot be set at the same time as -Wformat-security
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
postPatch = ''
|
||||
# Patch Chromium build tools
|
||||
(
|
||||
cd src/3rdparty/chromium;
|
||||
|
||||
# Manually fix unsupported shebangs
|
||||
substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \
|
||||
--replace "/usr/bin/env -S make -f" "/usr/bin/make -f" || true
|
||||
|
||||
# TODO: be more precise
|
||||
patchShebangs .
|
||||
)
|
||||
''
|
||||
# Prevent Chromium build script from making the path to `clang` relative to
|
||||
# the build directory. `clang_base_path` is the value of `QMAKE_CLANG_DIR`
|
||||
# from `src/core/config/mac_osx.pri`.
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace ./src/3rdparty/chromium/build/toolchain/mac/BUILD.gn \
|
||||
--replace 'prefix = rebase_path("$clang_base_path/bin/", root_build_dir)' 'prefix = "$clang_base_path/bin/"'
|
||||
''
|
||||
# Patch library paths in Qt sources
|
||||
+ ''
|
||||
sed -i \
|
||||
-e "s,QLibraryInfo::location(QLibraryInfo::DataPath),QLatin1String(\"$out\"),g" \
|
||||
-e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \
|
||||
-e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \
|
||||
src/core/web_engine_library_info.cpp
|
||||
''
|
||||
# Patch library paths in Chromium sources
|
||||
+ lib.optionalString (!stdenv.isDarwin) ''
|
||||
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \
|
||||
src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
|
||||
|
||||
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
|
||||
src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
|
||||
'' + lib.optionalString stdenv.isDarwin (
|
||||
(if (lib.versionAtLeast qtCompatVersion "5.14") then ''
|
||||
substituteInPlace src/buildtools/config/mac_osx.pri \
|
||||
--replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"'
|
||||
'' else ''
|
||||
substituteInPlace src/core/config/mac_osx.pri \
|
||||
--replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"'
|
||||
'')
|
||||
# Following is required to prevent a build error:
|
||||
# ninja: error: '/nix/store/z8z04p0ph48w22rqzx7ql67gy8cyvidi-SDKs/MacOSX10.12.sdk/usr/include/mach/exc.defs', needed by 'gen/third_party/crashpad/crashpad/util/mach/excUser.c', missing and no known rule to make it
|
||||
+ ''
|
||||
substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \
|
||||
--replace '$sysroot/usr' "${xnu}"
|
||||
''
|
||||
# Apple has some secret stuff they don't share with OpenBSM
|
||||
+ (if (lib.versionAtLeast qtCompatVersion "5.14") then ''
|
||||
substituteInPlace src/3rdparty/chromium/base/mac/mach_port_rendezvous.cc \
|
||||
--replace "audit_token_to_pid(request.trailer.msgh_audit)" "request.trailer.msgh_audit.val[5]"
|
||||
substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/mach/mach_message.cc \
|
||||
--replace "audit_token_to_pid(audit_trailer->msgh_audit)" "audit_trailer->msgh_audit.val[5]"
|
||||
'' else ''
|
||||
substituteInPlace src/3rdparty/chromium/base/mac/mach_port_broker.mm \
|
||||
--replace "audit_token_to_pid(msg.trailer.msgh_audit)" "msg.trailer.msgh_audit.val[5]"
|
||||
''));
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
|
||||
# with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit
|
||||
"-Wno-class-memaccess"
|
||||
] ++ lib.optionals (stdenv.hostPlatform.gcc.arch or "" == "sandybridge") [
|
||||
# it fails when compiled with -march=sandybridge https://github.com/NixOS/nixpkgs/pull/59148#discussion_r276696940
|
||||
# TODO: investigate and fix properly
|
||||
"-march=westmere"
|
||||
] ++ lib.optionals stdenv.cc.isClang [
|
||||
"-Wno-elaborated-enum-base"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12"
|
||||
"-DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_12"
|
||||
"-Wno-elaborated-enum-base"
|
||||
|
||||
#
|
||||
# Prevent errors like
|
||||
# /nix/store/xxx-apple-framework-CoreData/Library/Frameworks/CoreData.framework/Headers/NSEntityDescription.h:51:7:
|
||||
# error: pointer to non-const type 'id' with no explicit ownership
|
||||
# id** _kvcPropertyAccessors;
|
||||
#
|
||||
# TODO remove when new Apple SDK is in
|
||||
#
|
||||
"-fno-objc-arc"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
export NINJAFLAGS=-j$NIX_BUILD_CORES
|
||||
|
||||
if [ -d "$PWD/tools/qmake" ]; then
|
||||
QMAKEPATH="$PWD/tools/qmake''${QMAKEPATH:+:}$QMAKEPATH"
|
||||
fi
|
||||
'';
|
||||
|
||||
qmakeFlags = [ "--" "-system-ffmpeg" ]
|
||||
++ lib.optional (pipewireSupport && (lib.versionAtLeast qtCompatVersion "5.15")) "-webengine-webrtc-pipewire"
|
||||
++ lib.optional enableProprietaryCodecs "-proprietary-codecs";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
# Image formats
|
||||
libjpeg libpng libtiff libwebp
|
||||
|
||||
# Video formats
|
||||
srtp libvpx
|
||||
|
||||
# Audio formats
|
||||
libopus
|
||||
|
||||
# Text rendering
|
||||
harfbuzz icu
|
||||
|
||||
libevent
|
||||
ffmpeg_4
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
dbus zlib minizip snappy nss protobuf jsoncpp
|
||||
|
||||
# Audio formats
|
||||
alsa-lib
|
||||
|
||||
# Text rendering
|
||||
fontconfig freetype
|
||||
|
||||
libcap
|
||||
pciutils
|
||||
|
||||
# X11 libs
|
||||
xorg.xrandr libXScrnSaver libXcursor libXrandr xorg.libpciaccess libXtst
|
||||
xorg.libXcomposite xorg.libXdamage libdrm xorg.libxkbfile
|
||||
|
||||
] ++ lib.optionals (pipewireSupport && (lib.versionAtLeast qtCompatVersion "5.15")) [
|
||||
# Pipewire
|
||||
pipewire_0_2
|
||||
]
|
||||
|
||||
# FIXME These dependencies shouldn't be needed but can't find a way
|
||||
# around it. Chromium pulls this in while bootstrapping GN.
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
libobjc
|
||||
cctools
|
||||
|
||||
# frameworks
|
||||
ApplicationServices
|
||||
AVFoundation
|
||||
Foundation
|
||||
ForceFeedback
|
||||
GameController
|
||||
AppKit
|
||||
ImageCaptureCore
|
||||
CoreBluetooth
|
||||
IOBluetooth
|
||||
CoreWLAN
|
||||
Quartz
|
||||
Cocoa
|
||||
LocalAuthentication
|
||||
|
||||
openbsm
|
||||
libunwind
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
cups
|
||||
sandbox
|
||||
|
||||
# `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py`
|
||||
# to get some information about the host platform.
|
||||
(writeScriptBin "sw_vers" ''
|
||||
#!${stdenv.shell}
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-buildVersion) echo "17E199";;
|
||||
*) break ;;
|
||||
|
||||
esac
|
||||
shift
|
||||
done
|
||||
'')
|
||||
];
|
||||
|
||||
dontUseNinjaBuild = true;
|
||||
dontUseNinjaInstall = true;
|
||||
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
cat > $out/libexec/qt.conf <<EOF
|
||||
[Paths]
|
||||
Prefix = ..
|
||||
EOF
|
||||
'' + lib.optionalString (lib.versions.majorMinor qtCompatVersion == "5.15") ''
|
||||
# Fix for out-of-sync QtWebEngine and Qt releases (since 5.15.3)
|
||||
sed 's/${lib.head (lib.splitString "-" version)} /${qtCompatVersion} /' -i "$out"/lib/cmake/*/*Config.cmake
|
||||
'';
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A web engine based on the Chromium web browser";
|
||||
maintainers = with maintainers; [ matthewbauer ];
|
||||
|
||||
# qtwebengine-5.15.8: "QtWebEngine can only be built for x86,
|
||||
# x86-64, ARM, Aarch64, and MIPSel architectures."
|
||||
platforms =
|
||||
lib.trivial.pipe lib.systems.doubles.all [
|
||||
(map (double: lib.systems.elaborate { system = double; }))
|
||||
(lib.lists.filter (parsedPlatform: with parsedPlatform;
|
||||
isUnix &&
|
||||
(isx86_32 ||
|
||||
isx86_64 ||
|
||||
isAarch32 ||
|
||||
isAarch64 ||
|
||||
(isMips && isLittleEndian))))
|
||||
(map (plat: plat.system))
|
||||
];
|
||||
|
||||
# This build takes a long time; particularly on slow architectures
|
||||
timeout = 24 * 3600;
|
||||
# we are still stuck with MacOS SDK 10.12 on x86_64-darwin
|
||||
# and qtwebengine 5.14+ requires at least SDK 10.14
|
||||
# (qtwebengine 5.12 is fine with SDK 10.12)
|
||||
# on aarch64-darwin we are already at MacOS SDK 11.0
|
||||
broken = stdenv.isDarwin && stdenv.isx86_64 && (lib.versionAtLeast qtCompatVersion "5.14");
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{ qtModule, qtbase, qtwebsockets }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtwebglplugin";
|
||||
qtInputs = [ qtbase qtwebsockets ];
|
||||
}
|
||||
73
pkgs/development/libraries/qt-5/modules/qtwebkit.nix
Normal file
73
pkgs/development/libraries/qt-5/modules/qtwebkit.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{ qtModule, stdenv, lib, fetchurl
|
||||
, qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel
|
||||
, fontconfig, libwebp, libxml2, libxslt
|
||||
, sqlite, systemd, glib, gst_all_1, cmake
|
||||
, bison, flex, gdb, gperf, perl, pkg-config, python38, ruby
|
||||
, ICU, OpenGL
|
||||
}:
|
||||
|
||||
let
|
||||
hyphen = stdenv.mkDerivation rec {
|
||||
pname = "hyphen";
|
||||
version = "2.8.8";
|
||||
src = fetchurl {
|
||||
url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-${version}.tar.gz";
|
||||
sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705";
|
||||
};
|
||||
postPatch = ''
|
||||
patchShebangs tests
|
||||
'';
|
||||
buildInputs = [ perl ];
|
||||
};
|
||||
usingAnnulenWebkitFork = lib.versionAtLeast qtbase.version "5.11.0";
|
||||
in
|
||||
qtModule {
|
||||
pname = "qtwebkit";
|
||||
qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ]
|
||||
++ lib.optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia
|
||||
++ lib.optional usingAnnulenWebkitFork qtwebchannel;
|
||||
buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ]
|
||||
++ lib.optionals stdenv.isDarwin [ ICU OpenGL ]
|
||||
++ lib.optional usingAnnulenWebkitFork hyphen;
|
||||
nativeBuildInputs = [
|
||||
bison flex gdb gperf perl pkg-config python38 ruby
|
||||
] ++ lib.optional usingAnnulenWebkitFork cmake;
|
||||
|
||||
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"
|
||||
"-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.
|
||||
preConfigure = lib.optionalString (!usingAnnulenWebkitFork) ''
|
||||
QMAKEPATH="$PWD/Tools/qmake''${QMAKEPATH:+:}$QMAKEPATH"
|
||||
fixQtBuiltinPaths . '*.pr?'
|
||||
# Fix hydra's "Log limit exceeded"
|
||||
export qmakeFlags="$qmakeFlags CONFIG+=silent"
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
# 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"'';
|
||||
|
||||
doCheck = false; # fails 13 out of 13 tests (ctest)
|
||||
|
||||
# Hack to avoid TMPDIR in RPATHs.
|
||||
preFixup = ''
|
||||
rm -rf "$(pwd)"
|
||||
mkdir "$(pwd)"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
maintainers = with lib.maintainers; [ abbradar periklis ];
|
||||
};
|
||||
}
|
||||
7
pkgs/development/libraries/qt-5/modules/qtwebsockets.nix
Normal file
7
pkgs/development/libraries/qt-5/modules/qtwebsockets.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtbase, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtwebsockets";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
}
|
||||
12
pkgs/development/libraries/qt-5/modules/qtwebview.nix
Normal file
12
pkgs/development/libraries/qt-5/modules/qtwebview.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, stdenv, qtModule, qtdeclarative, qtwebengine, CoreFoundation, WebKit }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtwebview";
|
||||
qtInputs = [ qtdeclarative qtwebengine ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
CoreFoundation
|
||||
WebKit
|
||||
];
|
||||
outputs = [ "out" "dev" "bin" ];
|
||||
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework CoreFoundation -framework WebKit";
|
||||
}
|
||||
6
pkgs/development/libraries/qt-5/modules/qtx11extras.nix
Normal file
6
pkgs/development/libraries/qt-5/modules/qtx11extras.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ qtModule, qtbase }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtx11extras";
|
||||
qtInputs = [ qtbase ];
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{ qtModule, qtbase, qtdeclarative }:
|
||||
|
||||
qtModule {
|
||||
pname = "qtxmlpatterns";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
devTools = [ "bin/xmlpatterns" "bin/xmlpatternsvalidator" ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue