qt58: extend darwin compatibility
This commit is contained in:
parent
efe12d6658
commit
775531c1e3
|
@ -76,6 +76,7 @@ let
|
||||||
qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {};
|
qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {};
|
||||||
qtimageformats = callPackage ./qtimageformats.nix {};
|
qtimageformats = callPackage ./qtimageformats.nix {};
|
||||||
qtlocation = callPackage ./qtlocation.nix {};
|
qtlocation = callPackage ./qtlocation.nix {};
|
||||||
|
qtmacextras = callPackage ./qtmacextras.nix {};
|
||||||
qtmultimedia = callPackage ./qtmultimedia.nix {
|
qtmultimedia = callPackage ./qtmultimedia.nix {
|
||||||
inherit gstreamer gst-plugins-base;
|
inherit gstreamer gst-plugins-base;
|
||||||
};
|
};
|
||||||
|
@ -97,12 +98,13 @@ let
|
||||||
qtxmlpatterns = callPackage ./qtxmlpatterns.nix {};
|
qtxmlpatterns = callPackage ./qtxmlpatterns.nix {};
|
||||||
|
|
||||||
env = callPackage ../qt-env.nix {};
|
env = callPackage ../qt-env.nix {};
|
||||||
full = env "qt-${qtbase.version}" [
|
full = env "qt-${qtbase.version}" ([
|
||||||
qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
|
qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
|
||||||
qtimageformats qtlocation qtmultimedia qtquickcontrols qtscript
|
qtimageformats qtlocation qtmultimedia qtquickcontrols qtscript
|
||||||
qtsensors qtserialport qtsvg qttools qttranslations qtwayland
|
qtsensors qtserialport qtsvg qttools qttranslations
|
||||||
qtwebsockets qtx11extras qtxmlpatterns
|
qtwebsockets qtx11extras qtxmlpatterns
|
||||||
];
|
] ++ optional (!stdenv.isDarwin) qtwayland
|
||||||
|
++ optional (stdenv.isDarwin) qtmacextras);
|
||||||
|
|
||||||
makeQtWrapper =
|
makeQtWrapper =
|
||||||
makeSetupHook
|
makeSetupHook
|
||||||
|
|
|
@ -211,8 +211,10 @@ stdenv.mkDerivation {
|
||||||
libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil
|
libX11 libXcomposite libXext libXi libXrender libxcb libxkbcommon xcbutil
|
||||||
xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm
|
xcbutilimage xcbutilkeysyms xcbutilrenderutil xcbutilwm
|
||||||
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||||
ApplicationServices Foundation CoreServices AppKit Carbon OpenGL AGL Cocoa
|
AGL AppKit ApplicationServices Carbon Cocoa
|
||||||
DiskArbitration darwin.cf-private libiconv
|
CoreAudio CoreBluetooth CoreLocation CoreServices
|
||||||
|
DiskArbitration Foundation OpenGL
|
||||||
|
darwin.cf-private darwin.apple_sdk.sdk darwin.libobjc libiconv
|
||||||
]);
|
]);
|
||||||
|
|
||||||
buildInputs = [ ]
|
buildInputs = [ ]
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
{ qtSubmodule, lib, copyPathsToStore, python2, qtbase, qtsvg, qtxmlpatterns }:
|
{ stdenv, qtSubmodule, makeQtWrapper, copyPathsToStore, python2, qtbase, qtsvg, qtxmlpatterns }:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
qtSubmodule {
|
qtSubmodule {
|
||||||
name = "qtdeclarative";
|
name = "qtdeclarative";
|
||||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
patches = copyPathsToStore (readPathsFromFile ./. ./series);
|
||||||
qtInputs = [ qtbase qtsvg qtxmlpatterns ];
|
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
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
, alsaLib, gstreamer, gst-plugins-base, libpulseaudio
|
||||||
|
, darwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
qtSubmodule {
|
qtSubmodule {
|
||||||
name = "qtmultimedia";
|
name = "qtmultimedia";
|
||||||
qtInputs = [ qtbase qtdeclarative ];
|
qtInputs = [ qtbase qtdeclarative ];
|
||||||
buildInputs = [
|
buildInputs = [ pkgconfig gstreamer gst-plugins-base libpulseaudio]
|
||||||
pkgconfig alsaLib gstreamer gst-plugins-base libpulseaudio
|
++ optional (stdenv.isLinux) alsaLib;
|
||||||
];
|
|
||||||
qmakeFlags = [ "GST_VERSION=1.0" ];
|
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 {
|
qtSubmodule {
|
||||||
name = "qtsensors";
|
name = "qtsensors";
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ qtSubmodule, qtbase, substituteAll, systemd }:
|
{ stdenv, qtSubmodule, qtbase, substituteAll, systemd }:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
qtSubmodule {
|
qtSubmodule {
|
||||||
name = "qtserialport";
|
name = "qtserialport";
|
||||||
qtInputs = [ qtbase ];
|
qtInputs = [ qtbase ];
|
||||||
patches = [
|
patches = optionals (stdenv.isLinux) [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./0001-dlopen-serialport-udev.patch;
|
src = ./0001-dlopen-serialport-udev.patch;
|
||||||
libudev = systemd.lib;
|
libudev = systemd.lib;
|
||||||
|
|
|
@ -1,11 +1,28 @@
|
||||||
{ qtSubmodule, lib, copyPathsToStore, qtbase }:
|
{ stdenv, qtSubmodule, makeQtWrapper, copyPathsToStore, qtbase }:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
qtSubmodule {
|
qtSubmodule {
|
||||||
name = "qttools";
|
name = "qttools";
|
||||||
qtInputs = [ qtbase ];
|
qtInputs = [ qtbase ];
|
||||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
nativeBuildInputs = [ makeQtWrapper ];
|
||||||
|
|
||||||
|
patches = copyPathsToStore (readPathsFromFile ./. ./series);
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
moveToOutput "bin/qdbus" "$out"
|
moveToOutput "bin/qdbus" "$out"
|
||||||
moveToOutput "bin/qtpaths" "$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
|
, lib, stdenv # lib.optional, needsPax
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
qtSubmodule {
|
qtSubmodule {
|
||||||
name = "qtwebengine";
|
name = "qtwebengine";
|
||||||
qtInputs = [ qtquickcontrols qtlocation qtwebchannel ];
|
qtInputs = [ qtquickcontrols qtlocation qtwebchannel ];
|
||||||
|
@ -41,7 +43,7 @@ qtSubmodule {
|
||||||
-e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \
|
-e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \
|
||||||
-e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \
|
-e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \
|
||||||
src/core/web_engine_library_info.cpp
|
src/core/web_engine_library_info.cpp
|
||||||
|
'' + optionalString (!stdenv.isDarwin) ''
|
||||||
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \
|
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \
|
||||||
src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
|
src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
|
||||||
|
|
||||||
|
@ -49,11 +51,9 @@ qtSubmodule {
|
||||||
src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
|
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 = [
|
propagatedBuildInputs = [
|
||||||
dbus zlib minizip alsaLib snappy nss protobuf jsoncpp libevent
|
|
||||||
|
|
||||||
# Image formats
|
# Image formats
|
||||||
libjpeg libpng libtiff libwebp
|
libjpeg libpng libtiff libwebp
|
||||||
|
|
||||||
|
@ -61,19 +61,28 @@ qtSubmodule {
|
||||||
srtp libvpx
|
srtp libvpx
|
||||||
|
|
||||||
# Audio formats
|
# Audio formats
|
||||||
alsaLib libopus
|
libopus
|
||||||
|
|
||||||
# Text rendering
|
# 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
|
# X11 libs
|
||||||
xlibs.xrandr libXScrnSaver libXcursor libXrandr xlibs.libpciaccess libXtst
|
xlibs.xrandr libXScrnSaver libXcursor libXrandr xlibs.libpciaccess libXtst
|
||||||
xlibs.libXcomposite
|
xlibs.libXcomposite
|
||||||
|
|
||||||
libcap
|
|
||||||
pciutils
|
|
||||||
];
|
];
|
||||||
patches = lib.optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
|
patches = optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cat > $out/libexec/qt.conf <<EOF
|
cat > $out/libexec/qt.conf <<EOF
|
||||||
[Paths]
|
[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
|
, fontconfig, gdk_pixbuf, gtk2, libwebp, libxml2, libxslt
|
||||||
, sqlite, systemd, glib, gst_all_1
|
, sqlite, systemd, glib, gst_all_1
|
||||||
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
|
, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby
|
||||||
|
, darwin
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, flashplayerFix ? false
|
, flashplayerFix ? false
|
||||||
}:
|
}:
|
||||||
|
@ -11,10 +12,16 @@ with stdenv.lib;
|
||||||
qtSubmodule {
|
qtSubmodule {
|
||||||
name = "qtwebkit";
|
name = "qtwebkit";
|
||||||
qtInputs = [ qtdeclarative qtlocation qtsensors ];
|
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 = [
|
nativeBuildInputs = [
|
||||||
bison2 flex gdb gperf perl pkgconfig python2 ruby
|
bison2 flex gdb gperf perl pkgconfig python2 ruby
|
||||||
];
|
];
|
||||||
|
|
||||||
|
__impureHostDeps = optionals (stdenv.isDarwin) [
|
||||||
|
"/usr/lib/libicucore.dylib"
|
||||||
|
];
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
let dlopen-webkit-nsplugin = substituteAll {
|
let dlopen-webkit-nsplugin = substituteAll {
|
||||||
src = ./0001-dlopen-webkit-nsplugin.patch;
|
src = ./0001-dlopen-webkit-nsplugin.patch;
|
||||||
|
@ -30,6 +37,7 @@ qtSubmodule {
|
||||||
libudev = systemd.lib;
|
libudev = systemd.lib;
|
||||||
};
|
};
|
||||||
in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ]
|
in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ]
|
||||||
++ [ dlopen-webkit-udev ];
|
++ optionals (!stdenv.isDarwin) [ dlopen-webkit-udev ]
|
||||||
meta.maintainers = with stdenv.lib.maintainers; [ abbradar ];
|
++ optionals (stdenv.isDarwin) [ ./0004-icucore-darwin.patch ];
|
||||||
|
meta.maintainers = with stdenv.lib.maintainers; [ abbradar periklis ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue