2020-09-25 04:45:31 +00:00
|
|
|
/*
|
|
|
|
|
|
|
|
# Updates
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
Run `./fetch.sh` to update package sources from Git.
|
|
|
|
Check for any minor version changes.
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
{ newScope
|
|
|
|
, lib, stdenv, fetchurl, fetchgit, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper
|
|
|
|
, bison, cups ? null, harfbuzz, libGL, perl
|
|
|
|
, gstreamer, gst-plugins-base, gtk3, dconf
|
2021-12-26 17:43:05 +00:00
|
|
|
, darwin
|
2022-06-16 17:23:12 +00:00
|
|
|
, buildPackages
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
# options
|
2021-08-22 07:53:02 +00:00
|
|
|
, developerBuild ? false
|
|
|
|
, decryptSslTraffic ? false
|
|
|
|
, debug ? false
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
srcs = import ./srcs.nix { inherit lib fetchgit fetchFromGitHub; };
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
qtCompatVersion = srcs.qtbase.version;
|
|
|
|
|
|
|
|
patches = {
|
2021-08-22 07:53:02 +00:00
|
|
|
qtbase = lib.optionals stdenv.isDarwin [
|
|
|
|
./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
|
|
|
|
|
|
|
|
# Downgrade minimal required SDK to 10.12
|
|
|
|
./qtbase.patch.d/0013-define-kiosurfacesuccess.patch
|
|
|
|
./qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch
|
|
|
|
./qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch
|
|
|
|
./qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch
|
|
|
|
./qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch
|
|
|
|
./qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch
|
|
|
|
./qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch
|
|
|
|
./qtbase.patch.d/qtbase-sdk-10.12-mac.patch
|
|
|
|
|
|
|
|
# Patch framework detection to support X.framework/X.tbd,
|
|
|
|
# extending the current support for X.framework/X.
|
|
|
|
./qtbase.patch.d/0012-qtbase-tbd-frameworks.patch
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
./qtbase.patch.d/0014-aarch64-darwin.patch
|
2021-08-22 07:53:02 +00:00
|
|
|
] ++ [
|
|
|
|
./qtbase.patch.d/0003-qtbase-mkspecs.patch
|
|
|
|
./qtbase.patch.d/0004-qtbase-replace-libdir.patch
|
|
|
|
./qtbase.patch.d/0005-qtbase-cmake.patch
|
|
|
|
./qtbase.patch.d/0006-qtbase-gtk3.patch
|
|
|
|
./qtbase.patch.d/0007-qtbase-xcursor.patch
|
|
|
|
./qtbase.patch.d/0008-qtbase-tzdir.patch
|
|
|
|
./qtbase.patch.d/0009-qtbase-qtpluginpath.patch
|
|
|
|
./qtbase.patch.d/0010-qtbase-assert.patch
|
|
|
|
./qtbase.patch.d/0011-fix-header_module.patch
|
|
|
|
];
|
2022-11-21 17:40:18 +00:00
|
|
|
qtdeclarative = [
|
|
|
|
./qtdeclarative.patch
|
|
|
|
# prevent headaches from stale qmlcache data
|
|
|
|
./qtdeclarative-default-disable-qmlcache.patch
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
qtscript = [ ./qtscript.patch ];
|
|
|
|
qtserialport = [ ./qtserialport.patch ];
|
2021-12-06 16:07:01 +00:00
|
|
|
qtwebengine = lib.optionals stdenv.isDarwin [
|
2021-03-20 04:20:00 +00:00
|
|
|
./qtwebengine-darwin-no-platform-check.patch
|
|
|
|
./qtwebengine-mac-dont-set-dsymutil-path.patch
|
|
|
|
];
|
2020-12-25 13:55:36 +00:00
|
|
|
qtwebkit = [
|
2020-11-15 13:44:38 +00:00
|
|
|
(fetchpatch {
|
2020-12-25 13:55:36 +00:00
|
|
|
name = "qtwebkit-bison-3.7-build.patch";
|
|
|
|
url = "https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31.patch";
|
|
|
|
sha256 = "0h8ymfnwgkjkwaankr3iifiscsvngqpwb91yygndx344qdiw9y0n";
|
2020-11-15 13:44:38 +00:00
|
|
|
})
|
2021-05-20 23:08:51 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "qtwebkit-glib-2.68.patch";
|
|
|
|
url = "https://github.com/qtwebkit/qtwebkit/pull/1058/commits/5b698ba3faffd4e198a45be9fe74f53307395e4b.patch";
|
|
|
|
sha256 = "0a3xv0h4lv8wggckgy8cg8xnpkg7n9h45312pdjdnnwy87xvzss0";
|
|
|
|
})
|
2022-01-27 00:19:43 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "qtwebkit-darwin-handle.patch";
|
|
|
|
url = "https://github.com/qtwebkit/qtwebkit/commit/5c272a21e621a66862821d3ae680f27edcc64c19.patch";
|
|
|
|
sha256 = "9hjqLyABz372QDgoq7nXXXQ/3OXBGcYN1/92ekcC3WE=";
|
|
|
|
})
|
2020-12-25 13:55:36 +00:00
|
|
|
./qtwebkit.patch
|
2021-03-09 03:18:52 +00:00
|
|
|
./qtwebkit-icu68.patch
|
2021-08-22 07:53:02 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-12-25 13:55:36 +00:00
|
|
|
./qtwebkit-darwin-no-readline.patch
|
|
|
|
./qtwebkit-darwin-no-qos-classes.patch
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
qttools = [ ./qttools.patch ];
|
|
|
|
};
|
|
|
|
|
|
|
|
addPackages = self: with self;
|
|
|
|
let
|
2022-01-13 20:06:32 +00:00
|
|
|
qtModule =
|
|
|
|
import ../qtModule.nix
|
|
|
|
{
|
|
|
|
inherit perl;
|
|
|
|
inherit lib;
|
|
|
|
# Use a variant of mkDerivation that does not include wrapQtApplications
|
|
|
|
# to avoid cyclic dependencies between Qt modules.
|
|
|
|
mkDerivation =
|
|
|
|
import ../mkDerivation.nix
|
|
|
|
{ inherit lib; inherit debug; wrapQtAppsHook = null; }
|
|
|
|
stdenv.mkDerivation;
|
|
|
|
}
|
|
|
|
{ inherit self srcs patches; };
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
callPackage = self.newScope { inherit qtCompatVersion qtModule srcs stdenv; };
|
2020-09-25 04:45:31 +00:00
|
|
|
in {
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
inherit callPackage qtCompatVersion qtModule srcs;
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
mkDerivationWith =
|
|
|
|
import ../mkDerivation.nix
|
2021-02-05 17:12:51 +00:00
|
|
|
{ inherit lib; inherit debug; inherit (self) wrapQtAppsHook; };
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
mkDerivation = mkDerivationWith stdenv.mkDerivation;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
qtbase = callPackage ../modules/qtbase.nix {
|
|
|
|
inherit (srcs.qtbase) src version;
|
|
|
|
patches = patches.qtbase;
|
|
|
|
inherit bison cups harfbuzz libGL;
|
2022-01-26 04:04:25 +00:00
|
|
|
withGtk3 = !stdenv.isDarwin; inherit dconf gtk3;
|
2020-09-25 04:45:31 +00:00
|
|
|
inherit developerBuild decryptSslTraffic;
|
2022-08-12 12:06:08 +00:00
|
|
|
inherit (darwin.apple_sdk.frameworks) AGL AppKit ApplicationServices AVFoundation Carbon Cocoa CoreAudio CoreBluetooth
|
2021-08-22 07:53:02 +00:00
|
|
|
CoreLocation CoreServices DiskArbitration Foundation OpenGL MetalKit IOKit;
|
|
|
|
inherit (darwin) libobjc;
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
qt3d = callPackage ../modules/qt3d.nix {};
|
2020-09-25 04:45:31 +00:00
|
|
|
qtcharts = callPackage ../modules/qtcharts.nix {};
|
|
|
|
qtconnectivity = callPackage ../modules/qtconnectivity.nix {};
|
|
|
|
qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
|
|
|
|
qtdoc = callPackage ../modules/qtdoc.nix {};
|
2021-12-24 04:21:11 +00:00
|
|
|
qtgamepad = callPackage ../modules/qtgamepad.nix {
|
|
|
|
inherit (darwin.apple_sdk.frameworks) GameController;
|
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
|
|
|
|
qtimageformats = callPackage ../modules/qtimageformats.nix {};
|
|
|
|
qtlocation = callPackage ../modules/qtlocation.nix {};
|
2022-08-12 12:06:08 +00:00
|
|
|
qtlottie = callPackage ../modules/qtlottie.nix {};
|
2020-09-25 04:45:31 +00:00
|
|
|
qtmacextras = callPackage ../modules/qtmacextras.nix {};
|
|
|
|
qtmultimedia = callPackage ../modules/qtmultimedia.nix {
|
|
|
|
inherit gstreamer gst-plugins-base;
|
|
|
|
};
|
|
|
|
qtnetworkauth = callPackage ../modules/qtnetworkauth.nix {};
|
|
|
|
qtquick1 = null;
|
|
|
|
qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {};
|
|
|
|
qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {};
|
|
|
|
qtscript = callPackage ../modules/qtscript.nix {};
|
|
|
|
qtsensors = callPackage ../modules/qtsensors.nix {};
|
2021-08-22 07:53:02 +00:00
|
|
|
qtserialbus = callPackage ../modules/qtserialbus.nix {};
|
2020-09-25 04:45:31 +00:00
|
|
|
qtserialport = callPackage ../modules/qtserialport.nix {};
|
|
|
|
qtspeech = callPackage ../modules/qtspeech.nix {};
|
|
|
|
qtsvg = callPackage ../modules/qtsvg.nix {};
|
|
|
|
qtscxml = callPackage ../modules/qtscxml.nix {};
|
|
|
|
qttools = callPackage ../modules/qttools.nix {};
|
|
|
|
qttranslations = callPackage ../modules/qttranslations.nix {};
|
|
|
|
qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {};
|
|
|
|
qtwayland = callPackage ../modules/qtwayland.nix {};
|
|
|
|
qtwebchannel = callPackage ../modules/qtwebchannel.nix {};
|
2021-04-05 15:23:46 +00:00
|
|
|
qtwebengine = callPackage ../modules/qtwebengine.nix {
|
|
|
|
inherit (srcs.qtwebengine) version;
|
2021-08-22 07:53:02 +00:00
|
|
|
inherit (darwin) cctools libobjc libunwind xnu;
|
|
|
|
inherit (darwin.apple_sdk.libs) sandbox;
|
|
|
|
inherit (darwin.apple_sdk.frameworks) ApplicationServices AVFoundation Foundation ForceFeedback GameController AppKit
|
|
|
|
ImageCaptureCore CoreBluetooth IOBluetooth CoreWLAN Quartz Cocoa LocalAuthentication;
|
2021-04-05 15:23:46 +00:00
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {};
|
2021-08-22 07:53:02 +00:00
|
|
|
qtwebkit = callPackage ../modules/qtwebkit.nix {
|
|
|
|
inherit (darwin) ICU;
|
|
|
|
inherit (darwin.apple_sdk.frameworks) OpenGL;
|
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
|
2021-08-22 07:53:02 +00:00
|
|
|
qtwebview = callPackage ../modules/qtwebview.nix {
|
|
|
|
inherit (darwin.apple_sdk.frameworks) CoreFoundation WebKit;
|
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
qtx11extras = callPackage ../modules/qtx11extras.nix {};
|
|
|
|
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
|
|
|
|
|
|
|
|
env = callPackage ../qt-env.nix {};
|
|
|
|
full = env "qt-full-${qtbase.version}" ([
|
2021-09-18 10:52:07 +00:00
|
|
|
qt3d qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects
|
2020-09-25 04:45:31 +00:00
|
|
|
qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2
|
|
|
|
qtscript qtsensors qtserialport qtsvg qttools qttranslations
|
|
|
|
qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets
|
2022-08-12 12:06:08 +00:00
|
|
|
qtwebview qtx11extras qtxmlpatterns qtlottie
|
2021-08-22 07:53:02 +00:00
|
|
|
] ++ lib.optional (!stdenv.isDarwin) qtwayland
|
|
|
|
++ lib.optional (stdenv.isDarwin) qtmacextras);
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
qmake = makeSetupHook {
|
|
|
|
deps = [ self.qtbase.dev ];
|
|
|
|
substitutions = {
|
2021-02-19 19:06:45 +00:00
|
|
|
inherit debug;
|
2020-09-25 04:45:31 +00:00
|
|
|
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
|
|
|
|
};
|
|
|
|
} ../hooks/qmake-hook.sh;
|
|
|
|
|
|
|
|
wrapQtAppsHook = makeSetupHook {
|
2022-06-16 17:23:12 +00:00
|
|
|
deps = [ self.qtbase.dev buildPackages.makeWrapper ]
|
2021-08-22 07:53:02 +00:00
|
|
|
++ lib.optional stdenv.isLinux self.qtwayland.dev;
|
2020-09-25 04:45:31 +00:00
|
|
|
} ../hooks/wrap-qt-apps-hook.sh;
|
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
in lib.makeScope newScope addPackages
|