2022-06-16 17:23:12 +00:00
|
|
|
{ newScope
|
|
|
|
, lib
|
|
|
|
, stdenv
|
2024-01-02 11:29:13 +00:00
|
|
|
, generateSplicesForMkScope
|
|
|
|
, makeScopeWithSplicing'
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchurl
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchpatch2
|
2022-06-16 17:23:12 +00:00
|
|
|
, makeSetupHook
|
|
|
|
, makeWrapper
|
2023-04-12 12:48:02 +00:00
|
|
|
, gst_all_1
|
2022-11-21 17:40:18 +00:00
|
|
|
, libglvnd
|
2022-12-17 10:02:37 +00:00
|
|
|
, darwin
|
2023-11-16 04:20:00 +00:00
|
|
|
, overrideSDK
|
2022-06-16 17:23:12 +00:00
|
|
|
, buildPackages
|
2023-10-09 19:29:22 +00:00
|
|
|
, python3
|
2024-01-02 11:29:13 +00:00
|
|
|
, config
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
srcs = import ./srcs.nix {
|
|
|
|
inherit fetchurl;
|
|
|
|
mirror = "mirror://qt";
|
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
addPackages = self:
|
2022-06-16 17:23:12 +00:00
|
|
|
let
|
2023-04-12 12:48:02 +00:00
|
|
|
callPackage = self.newScope ({
|
2024-01-02 11:29:13 +00:00
|
|
|
inherit (self) qtModule;
|
|
|
|
inherit srcs python3;
|
2024-04-21 15:54:59 +00:00
|
|
|
stdenv =
|
2024-09-26 11:04:55 +00:00
|
|
|
if stdenv.hostPlatform.isDarwin
|
2024-04-21 15:54:59 +00:00
|
|
|
then overrideSDK stdenv { darwinMinVersion = "11.0"; darwinSdkVersion = "11.0"; }
|
|
|
|
else stdenv;
|
2023-04-12 12:48:02 +00:00
|
|
|
});
|
2022-06-16 17:23:12 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
inherit callPackage srcs;
|
|
|
|
|
|
|
|
qtModule = callPackage ./qtModule.nix { };
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
qtbase = callPackage ./modules/qtbase.nix {
|
2024-02-29 20:09:43 +00:00
|
|
|
withGtk3 = !stdenv.hostPlatform.isMinGW;
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit (srcs.qtbase) src version;
|
2023-04-29 16:46:19 +00:00
|
|
|
inherit (darwin.apple_sdk_11_0.frameworks)
|
|
|
|
AGL AVFoundation AppKit Contacts CoreBluetooth EventKit GSS MetalKit;
|
2022-10-21 18:38:19 +00:00
|
|
|
patches = [
|
2023-04-29 16:46:19 +00:00
|
|
|
./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch
|
|
|
|
./patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch
|
|
|
|
./patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch
|
2024-04-21 15:54:59 +00:00
|
|
|
./patches/0004-qtbase-qt-cmake-always-use-cmake-from-path.patch
|
|
|
|
./patches/0005-qtbase-find-tools-in-PATH.patch
|
|
|
|
./patches/0006-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch
|
|
|
|
./patches/0007-qtbase-allow-translations-outside-prefix.patch
|
|
|
|
./patches/0008-qtbase-find-qmlimportscanner-in-macdeployqt-via-envi.patch
|
|
|
|
./patches/0009-qtbase-check-in-the-QML-folder-of-this-library-does-.patch
|
|
|
|
./patches/0010-qtbase-derive-plugin-load-path-from-PATH.patch
|
2024-01-02 11:29:13 +00:00
|
|
|
# Revert "macOS: Silence warning about supporting secure state restoration"
|
|
|
|
# fix build with macOS sdk < 12.0
|
|
|
|
(fetchpatch2 {
|
|
|
|
url = "https://github.com/qt/qtbase/commit/fc1549c01445bb9c99d3ba6de8fa9da230614e72.patch";
|
|
|
|
revert = true;
|
|
|
|
hash = "sha256-cjB2sC4cvZn0UEc+sm6ZpjyC78ssqB1Kb5nlZQ15M4A=";
|
|
|
|
})
|
2022-10-21 18:38:19 +00:00
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
2023-04-12 12:48:02 +00:00
|
|
|
env = callPackage ./qt-env.nix { };
|
2024-02-29 20:09:43 +00:00
|
|
|
full = callPackage
|
|
|
|
({ env, qtbase }: env "qt-full-${qtbase.version}"
|
|
|
|
# `with self` is ok to use here because having these spliced is unnecessary
|
|
|
|
(with self;[
|
|
|
|
qt3d
|
|
|
|
qt5compat
|
|
|
|
qtcharts
|
|
|
|
qtconnectivity
|
|
|
|
qtdatavis3d
|
|
|
|
qtdeclarative
|
|
|
|
qtdoc
|
|
|
|
qtgraphs
|
|
|
|
qtgrpc
|
|
|
|
qthttpserver
|
|
|
|
qtimageformats
|
|
|
|
qtlanguageserver
|
|
|
|
qtlocation
|
|
|
|
qtlottie
|
|
|
|
qtmultimedia
|
|
|
|
qtmqtt
|
|
|
|
qtnetworkauth
|
|
|
|
qtpositioning
|
|
|
|
qtsensors
|
|
|
|
qtserialbus
|
|
|
|
qtserialport
|
|
|
|
qtshadertools
|
|
|
|
qtspeech
|
|
|
|
qtquick3d
|
|
|
|
qtquick3dphysics
|
|
|
|
qtquickeffectmaker
|
|
|
|
qtquicktimeline
|
|
|
|
qtremoteobjects
|
|
|
|
qtsvg
|
|
|
|
qtscxml
|
|
|
|
qttools
|
|
|
|
qttranslations
|
|
|
|
qtvirtualkeyboard
|
|
|
|
qtwebchannel
|
|
|
|
qtwebengine
|
|
|
|
qtwebsockets
|
|
|
|
qtwebview
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ qtwayland libglvnd ]))
|
2024-02-29 20:09:43 +00:00
|
|
|
{ };
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
qt3d = callPackage ./modules/qt3d.nix { };
|
|
|
|
qt5compat = callPackage ./modules/qt5compat.nix { };
|
|
|
|
qtcharts = callPackage ./modules/qtcharts.nix { };
|
2022-12-17 10:02:37 +00:00
|
|
|
qtconnectivity = callPackage ./modules/qtconnectivity.nix {
|
2023-04-29 16:46:19 +00:00
|
|
|
inherit (darwin.apple_sdk_11_0.frameworks) IOBluetooth PCSC;
|
2022-12-17 10:02:37 +00:00
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
qtdatavis3d = callPackage ./modules/qtdatavis3d.nix { };
|
|
|
|
qtdeclarative = callPackage ./modules/qtdeclarative.nix { };
|
|
|
|
qtdoc = callPackage ./modules/qtdoc.nix { };
|
2023-10-19 13:55:26 +00:00
|
|
|
qtgraphs = callPackage ./modules/qtgraphs.nix { };
|
|
|
|
qtgrpc = callPackage ./modules/qtgrpc.nix { };
|
2022-09-30 11:47:45 +00:00
|
|
|
qthttpserver = callPackage ./modules/qthttpserver.nix { };
|
2022-06-16 17:23:12 +00:00
|
|
|
qtimageformats = callPackage ./modules/qtimageformats.nix { };
|
|
|
|
qtlanguageserver = callPackage ./modules/qtlanguageserver.nix { };
|
2023-04-29 16:46:19 +00:00
|
|
|
qtlocation = callPackage ./modules/qtlocation.nix { };
|
2022-06-16 17:23:12 +00:00
|
|
|
qtlottie = callPackage ./modules/qtlottie.nix { };
|
|
|
|
qtmultimedia = callPackage ./modules/qtmultimedia.nix {
|
2023-04-12 12:48:02 +00:00
|
|
|
inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi;
|
2022-12-17 10:02:37 +00:00
|
|
|
inherit (darwin.apple_sdk_11_0.frameworks) VideoToolbox;
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
2023-04-29 16:46:19 +00:00
|
|
|
qtmqtt = callPackage ./modules/qtmqtt.nix { };
|
2022-06-16 17:23:12 +00:00
|
|
|
qtnetworkauth = callPackage ./modules/qtnetworkauth.nix { };
|
|
|
|
qtpositioning = callPackage ./modules/qtpositioning.nix { };
|
|
|
|
qtsensors = callPackage ./modules/qtsensors.nix { };
|
|
|
|
qtserialbus = callPackage ./modules/qtserialbus.nix { };
|
|
|
|
qtserialport = callPackage ./modules/qtserialport.nix { };
|
|
|
|
qtshadertools = callPackage ./modules/qtshadertools.nix { };
|
2022-12-17 10:02:37 +00:00
|
|
|
qtspeech = callPackage ./modules/qtspeech.nix {
|
|
|
|
inherit (darwin.apple_sdk_11_0.frameworks) Cocoa;
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
qtquick3d = callPackage ./modules/qtquick3d.nix { };
|
2022-09-30 11:47:45 +00:00
|
|
|
qtquick3dphysics = callPackage ./modules/qtquick3dphysics.nix { };
|
2023-04-29 16:46:19 +00:00
|
|
|
qtquickeffectmaker = callPackage ./modules/qtquickeffectmaker.nix { };
|
2022-06-16 17:23:12 +00:00
|
|
|
qtquicktimeline = callPackage ./modules/qtquicktimeline.nix { };
|
|
|
|
qtremoteobjects = callPackage ./modules/qtremoteobjects.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 { };
|
2023-04-29 16:46:19 +00:00
|
|
|
qtwebengine = callPackage ./modules/qtwebengine.nix {
|
2024-07-31 10:19:44 +00:00
|
|
|
inherit (darwin) autoSignDarwinBinariesHook bootstrap_cmds xnu;
|
2023-11-16 04:20:00 +00:00
|
|
|
inherit (darwin.apple_sdk_11_0) libpm libunwind;
|
2023-04-29 16:46:19 +00:00
|
|
|
inherit (darwin.apple_sdk_11_0.libs) sandbox;
|
|
|
|
inherit (darwin.apple_sdk_11_0.frameworks)
|
|
|
|
AGL AVFoundation Accelerate Cocoa CoreLocation CoreML ForceFeedback
|
|
|
|
GameController ImageCaptureCore LocalAuthentication
|
|
|
|
MediaAccessibility MediaPlayer MetalKit Network OpenDirectory Quartz
|
|
|
|
ReplayKit SecurityInterface Vision;
|
2024-02-29 20:09:43 +00:00
|
|
|
qtModule = callPackage
|
|
|
|
({ qtModule }: qtModule.override {
|
|
|
|
stdenv =
|
2024-09-26 11:04:55 +00:00
|
|
|
if stdenv.hostPlatform.isDarwin
|
2024-04-21 15:54:59 +00:00
|
|
|
then overrideSDK stdenv { darwinMinVersion = "11.0"; darwinSdkVersion = "11.0"; }
|
2024-02-29 20:09:43 +00:00
|
|
|
else stdenv;
|
|
|
|
})
|
|
|
|
{ };
|
2023-04-29 16:46:19 +00:00
|
|
|
xcbuild = buildPackages.xcbuild.override {
|
|
|
|
productBuildVer = "20A2408";
|
|
|
|
};
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
qtwebsockets = callPackage ./modules/qtwebsockets.nix { };
|
2022-12-17 10:02:37 +00:00
|
|
|
qtwebview = callPackage ./modules/qtwebview.nix {
|
|
|
|
inherit (darwin.apple_sdk_11_0.frameworks) WebKit;
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
wrapQtAppsHook = callPackage
|
|
|
|
({ makeBinaryWrapper }: makeSetupHook
|
|
|
|
{
|
|
|
|
name = "wrap-qt6-apps-hook";
|
|
|
|
propagatedBuildInputs = [ makeBinaryWrapper ];
|
|
|
|
} ./hooks/wrap-qt-apps-hook.sh)
|
|
|
|
{ };
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
qmake = callPackage
|
|
|
|
({ qtbase }: makeSetupHook
|
|
|
|
{
|
|
|
|
name = "qmake6-hook";
|
|
|
|
propagatedBuildInputs = [ qtbase.dev ];
|
|
|
|
substitutions = {
|
|
|
|
fix_qmake_libtool = ./hooks/fix-qmake-libtool.sh;
|
|
|
|
};
|
|
|
|
} ./hooks/qmake-hook.sh)
|
|
|
|
{ };
|
2024-01-02 11:29:13 +00:00
|
|
|
} // lib.optionalAttrs config.allowAliases {
|
2024-04-21 15:54:59 +00:00
|
|
|
# Remove completely before 24.11
|
|
|
|
overrideScope' = builtins.throw "qt6 now uses makeScopeWithSplicing which does not have \"overrideScope'\", use \"overrideScope\".";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
baseScope = makeScopeWithSplicing' {
|
|
|
|
otherSplices = generateSplicesForMkScope "qt6";
|
|
|
|
f = addPackages;
|
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
bootstrapScope = baseScope.overrideScope (final: prev: {
|
2023-10-09 19:29:22 +00:00
|
|
|
qtbase = prev.qtbase.override { qttranslations = null; };
|
|
|
|
qtdeclarative = null;
|
|
|
|
});
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
finalScope = baseScope.overrideScope (final: prev: {
|
2023-10-09 19:29:22 +00:00
|
|
|
qttranslations = bootstrapScope.qttranslations;
|
|
|
|
});
|
2024-02-29 20:09:43 +00:00
|
|
|
in
|
|
|
|
finalScope
|