diff --git a/pkgs/development/libraries/qt-5/5.8/default.nix b/pkgs/development/libraries/qt-5/5.8/default.nix index eb26f88f725..2865a879f47 100644 --- a/pkgs/development/libraries/qt-5/5.8/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/default.nix @@ -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 diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix index 9642b613677..0af6ed8b594 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix @@ -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 = [ ] diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix index 9b6a6c46176..acddbd9e365 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/default.nix @@ -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 + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtmacextras.nix b/pkgs/development/libraries/qt-5/5.8/qtmacextras.nix new file mode 100644 index 00000000000..582294cc7f7 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.8/qtmacextras.nix @@ -0,0 +1,10 @@ +{ qtSubmodule, qtbase, lib }: + +qtSubmodule { + name = "qtmacextras"; + qtInputs = [ qtbase ]; + meta = with lib; { + maintainers = with maintainers; [ periklis ]; + platforms = platforms.darwin; + }; +} diff --git a/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix b/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix index 7c1cc5da07e..1c2dcc90d41 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtmultimedia.nix @@ -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"; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtsensors.nix b/pkgs/development/libraries/qt-5/5.8/qtsensors.nix index 61e64dc47e4..7bb18f56fe2 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtsensors.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtsensors.nix @@ -1,4 +1,6 @@ -{ qtSubmodule, qtbase, qtdeclarative }: +{ stdenv, qtSubmodule, qtbase, qtdeclarative }: + +with stdenv.lib; qtSubmodule { name = "qtsensors"; diff --git a/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix index 2bffd0a2bd6..1fde2c2bd18 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtserialport/default.nix @@ -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; diff --git a/pkgs/development/libraries/qt-5/5.8/qttools/default.nix b/pkgs/development/libraries/qt-5/5.8/qttools/default.nix index d72d7b6c64c..6b97c2d85cd 100644 --- a/pkgs/development/libraries/qt-5/5.8/qttools/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qttools/default.nix @@ -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 + ''; } diff --git a/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix b/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix index 1edb0846029..37f12eed758 100644 --- a/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix +++ b/pkgs/development/libraries/qt-5/5.8/qtwebengine/default.nix @@ -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 <