qt58: extend darwin compatibility
This commit is contained in:
parent
efe12d6658
commit
775531c1e3
@ -76,6 +76,7 @@ let
|
||||
qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {};
|
||||
qtimageformats = callPackage ./qtimageformats.nix {};
|
||||
qtlocation = callPackage ./qtlocation.nix {};
|
||||
qtmacextras = callPackage ./qtmacextras.nix {};
|
||||
qtmultimedia = callPackage ./qtmultimedia.nix {
|
||||
inherit gstreamer gst-plugins-base;
|
||||
};
|
||||
@ -97,12 +98,13 @@ let
|
||||
qtxmlpatterns = callPackage ./qtxmlpatterns.nix {};
|
||||
|
||||
env = callPackage ../qt-env.nix {};
|
||||
full = env "qt-${qtbase.version}" [
|
||||
full = env "qt-${qtbase.version}" ([
|
||||
qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
|
||||
qtimageformats qtlocation qtmultimedia qtquickcontrols qtscript
|
||||
qtsensors qtserialport qtsvg qttools qttranslations qtwayland
|
||||
qtsensors qtserialport qtsvg qttools qttranslations
|
||||
qtwebsockets qtx11extras qtxmlpatterns
|
||||
];
|
||||
] ++ optional (!stdenv.isDarwin) qtwayland
|
||||
++ optional (stdenv.isDarwin) qtmacextras);
|
||||
|
||||
makeQtWrapper =
|
||||
makeSetupHook
|
||||
|
@ -211,8 +211,10 @@ stdenv.mkDerivation {
|
||||
libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil
|
||||
xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm
|
||||
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
ApplicationServices Foundation CoreServices AppKit Carbon OpenGL AGL Cocoa
|
||||
DiskArbitration darwin.cf-private libiconv
|
||||
AGL AppKit ApplicationServices Carbon Cocoa
|
||||
CoreAudio CoreBluetooth CoreLocation CoreServices
|
||||
DiskArbitration Foundation OpenGL
|
||||
darwin.cf-private darwin.apple_sdk.sdk darwin.libobjc libiconv
|
||||
]);
|
||||
|
||||
buildInputs = [ ]
|
||||
|
@ -1,8 +1,18 @@
|
||||
{ qtSubmodule, lib, copyPathsToStore, python2, qtbase, qtsvg, qtxmlpatterns }:
|
||||
{ stdenv, qtSubmodule, makeQtWrapper, copyPathsToStore, python2, qtbase, qtsvg, qtxmlpatterns }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
qtSubmodule {
|
||||
name = "qtdeclarative";
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
patches = copyPathsToStore (readPathsFromFile ./. ./series);
|
||||
qtInputs = [ qtbase qtsvg qtxmlpatterns ];
|
||||
nativeBuildInputs = [ python2 ];
|
||||
nativeBuildInputs = [ python2 makeQtWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
wrapQtProgram $out/bin/qmleasing
|
||||
wrapQtProgram $out/bin/qmlscene
|
||||
wrapQtProgram $out/bin/qmltestrunner
|
||||
'' + optionalString (stdenv.isDarwin) ''
|
||||
wrapQtProgram $out/bin/qml.app/Contents/MacOS/qml
|
||||
'';
|
||||
}
|
||||
|
10
pkgs/development/libraries/qt-5/5.8/qtmacextras.nix
Normal file
10
pkgs/development/libraries/qt-5/5.8/qtmacextras.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ qtSubmodule, qtbase, lib }:
|
||||
|
||||
qtSubmodule {
|
||||
name = "qtmacextras";
|
||||
qtInputs = [ qtbase ];
|
||||
meta = with lib; {
|
||||
maintainers = with maintainers; [ periklis ];
|
||||
platforms = platforms.darwin;
|
||||
};
|
||||
}
|
@ -1,12 +1,15 @@
|
||||
{ qtSubmodule, qtbase, qtdeclarative, pkgconfig
|
||||
{ stdenv, qtSubmodule, qtbase, qtdeclarative, pkgconfig
|
||||
, alsaLib, gstreamer, gst-plugins-base, libpulseaudio
|
||||
, darwin
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
qtSubmodule {
|
||||
name = "qtmultimedia";
|
||||
qtInputs = [ qtbase qtdeclarative ];
|
||||
buildInputs = [
|
||||
pkgconfig alsaLib gstreamer gst-plugins-base libpulseaudio
|
||||
];
|
||||
buildInputs = [ pkgconfig gstreamer gst-plugins-base libpulseaudio]
|
||||
++ optional (stdenv.isLinux) alsaLib;
|
||||
qmakeFlags = [ "GST_VERSION=1.0" ];
|
||||
NIX_LDFLAGS = optionalString (stdenv.isDarwin) "-lobjc";
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
{ qtSubmodule, qtbase, qtdeclarative }:
|
||||
{ stdenv, qtSubmodule, qtbase, qtdeclarative }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
qtSubmodule {
|
||||
name = "qtsensors";
|
||||
|
@ -1,9 +1,11 @@
|
||||
{ qtSubmodule, qtbase, substituteAll, systemd }:
|
||||
{ stdenv, qtSubmodule, qtbase, substituteAll, systemd }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
qtSubmodule {
|
||||
name = "qtserialport";
|
||||
qtInputs = [ qtbase ];
|
||||
patches = [
|
||||
patches = optionals (stdenv.isLinux) [
|
||||
(substituteAll {
|
||||
src = ./0001-dlopen-serialport-udev.patch;
|
||||
libudev = systemd.lib;
|
||||
|
@ -1,11 +1,28 @@
|
||||
{ qtSubmodule, lib, copyPathsToStore, qtbase }:
|
||||
{ stdenv, qtSubmodule, makeQtWrapper, copyPathsToStore, qtbase }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
qtSubmodule {
|
||||
name = "qttools";
|
||||
qtInputs = [ qtbase ];
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
nativeBuildInputs = [ makeQtWrapper ];
|
||||
|
||||
patches = copyPathsToStore (readPathsFromFile ./. ./series);
|
||||
postFixup = ''
|
||||
moveToOutput "bin/qdbus" "$out"
|
||||
moveToOutput "bin/qtpaths" "$out"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
wrapQtProgram $out/bin/qcollectiongenerator
|
||||
wrapQtProgram $out/bin/qhelpconverter
|
||||
wrapQtProgram $out/bin/qhelpgenerator
|
||||
wrapQtProgram $out/bin/qtdiag
|
||||
'' + optionalString (stdenv.isDarwin) ''
|
||||
wrapQtProgram $out/bin/Assistant.app/Contents/MacOS/Assistant
|
||||
wrapQtProgram $out/bin/Designer.app/Contents/MacOS/Designer
|
||||
wrapQtProgram $out/bin/Linguist.app/Contents/MacOS/Linguist
|
||||
wrapQtProgram $out/bin/pixeltool.app/Contents/MacOS/pixeltool
|
||||
wrapQtProgram $out/bin/qdbusviewer.app/Contents/MacOS/qdbusviewer
|
||||
'';
|
||||
}
|
||||
|
@ -17,6 +17,8 @@
|
||||
, lib, stdenv # lib.optional, needsPax
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
qtSubmodule {
|
||||
name = "qtwebengine";
|
||||
qtInputs = [ qtquickcontrols qtlocation qtwebchannel ];
|
||||
@ -41,7 +43,7 @@ qtSubmodule {
|
||||
-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
|
||||
|
||||
'' + optionalString (!stdenv.isDarwin) ''
|
||||
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \
|
||||
src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
|
||||
|
||||
@ -49,11 +51,9 @@ qtSubmodule {
|
||||
src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
|
||||
'';
|
||||
|
||||
qmakeFlags = lib.optional enableProprietaryCodecs "WEBENGINE_CONFIG+=use_proprietary_codecs";
|
||||
qmakeFlags = optional enableProprietaryCodecs "WEBENGINE_CONFIG+=use_proprietary_codecs";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dbus zlib minizip alsaLib snappy nss protobuf jsoncpp libevent
|
||||
|
||||
# Image formats
|
||||
libjpeg libpng libtiff libwebp
|
||||
|
||||
@ -61,19 +61,28 @@ qtSubmodule {
|
||||
srtp libvpx
|
||||
|
||||
# Audio formats
|
||||
alsaLib libopus
|
||||
libopus
|
||||
|
||||
# Text rendering
|
||||
fontconfig freetype harfbuzz icu
|
||||
harfbuzz icu
|
||||
]
|
||||
++ optionals (!stdenv.isDarwin) [
|
||||
dbus zlib minizip snappy nss protobuf jsoncpp libevent
|
||||
|
||||
# Audio formats
|
||||
alsaLib
|
||||
|
||||
# Text rendering
|
||||
fontconfig freetype
|
||||
|
||||
libcap
|
||||
pciutils
|
||||
|
||||
# X11 libs
|
||||
xlibs.xrandr libXScrnSaver libXcursor libXrandr xlibs.libpciaccess libXtst
|
||||
xlibs.libXcomposite
|
||||
|
||||
libcap
|
||||
pciutils
|
||||
];
|
||||
patches = lib.optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
|
||||
patches = optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
|
||||
postInstall = ''
|
||||
cat > $out/libexec/qt.conf <<EOF
|
||||
[Paths]
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- qtwebkit-opensource-src-5.8.0.orig/Source/WTF/WTF.pri
|
||||
+++ qtwebkit-opensource-src-5.8.0/Source/WTF/WTF.pri
|
||||
@@ -12,7 +12,7 @@
|
||||
# Mac OS does ship libicu but not the associated header files.
|
||||
# Therefore WebKit provides adequate header files.
|
||||
INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH
|
||||
- LIBS += -licucore
|
||||
+ LIBS += /usr/lib/libicucore.dylib
|
||||
} else:!use?(wchar_unicode): {
|
||||
win32 {
|
||||
CONFIG(static, static|shared) {
|
@ -2,6 +2,7 @@
|
||||
, fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt
|
||||
, sqlite, systemd, glib, gst_all_1
|
||||
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
|
||||
, darwin
|
||||
, substituteAll
|
||||
, flashplayerFix ? false
|
||||
}:
|
||||
@ -11,10 +12,16 @@ with stdenv.lib;
|
||||
qtSubmodule {
|
||||
name = "qtwebkit";
|
||||
qtInputs = [ qtdeclarative qtlocation qtsensors ];
|
||||
buildInputs = [ fontconfig libwebp libxml2 libxslt sqlite glib gst_all_1.gstreamer gst_all_1.gst-plugins-base ];
|
||||
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 ]);
|
||||
nativeBuildInputs = [
|
||||
bison2 flex gdb gperf perl pkgconfig python2 ruby
|
||||
];
|
||||
|
||||
__impureHostDeps = optionals (stdenv.isDarwin) [
|
||||
"/usr/lib/libicucore.dylib"
|
||||
];
|
||||
|
||||
patches =
|
||||
let dlopen-webkit-nsplugin = substituteAll {
|
||||
src = ./0001-dlopen-webkit-nsplugin.patch;
|
||||
@ -30,6 +37,7 @@ qtSubmodule {
|
||||
libudev = systemd.lib;
|
||||
};
|
||||
in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ]
|
||||
++ [ dlopen-webkit-udev ];
|
||||
meta.maintainers = with stdenv.lib.maintainers; [ abbradar ];
|
||||
++ optionals (!stdenv.isDarwin) [ dlopen-webkit-udev ]
|
||||
++ optionals (stdenv.isDarwin) [ ./0004-icucore-darwin.patch ];
|
||||
meta.maintainers = with stdenv.lib.maintainers; [ abbradar periklis ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user