qt6: replace stdenv.is* with stdenv.hostPlatform.is*
This commit is contained in:
parent
cc0531bd81
commit
73e9155639
@ -32,7 +32,7 @@ let
|
||||
callPackage = self.newScope ({
|
||||
inherit (self) qtModule;
|
||||
inherit srcs python3;
|
||||
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
|
||||
stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
|
||||
});
|
||||
in
|
||||
{
|
||||
@ -109,7 +109,7 @@ let
|
||||
qtwebengine
|
||||
qtwebsockets
|
||||
qtwebview
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [ qtwayland libglvnd ])) { };
|
||||
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ qtwayland libglvnd ])) { };
|
||||
|
||||
qt3d = callPackage ./modules/qt3d.nix { };
|
||||
qt5compat = callPackage ./modules/qt5compat.nix { };
|
||||
@ -163,7 +163,7 @@ let
|
||||
MediaAccessibility MediaPlayer MetalKit Network OpenDirectory Quartz
|
||||
ReplayKit SecurityInterface Vision;
|
||||
qtModule = callPackage ({ qtModule }: qtModule.override {
|
||||
stdenv = if stdenv.isDarwin
|
||||
stdenv = if stdenv.hostPlatform.isDarwin
|
||||
then overrideSDK stdenv { darwinMinVersion = "10.13"; darwinSdkVersion = "11.0"; }
|
||||
else stdenv;
|
||||
}) { };
|
||||
|
@ -21,7 +21,7 @@
|
||||
, double-conversion
|
||||
, util-linux
|
||||
, systemd
|
||||
, systemdSupport ? stdenv.isLinux
|
||||
, systemdSupport ? stdenv.hostPlatform.isLinux
|
||||
, libb2
|
||||
, md4c
|
||||
, mtdev
|
||||
@ -87,7 +87,7 @@
|
||||
, dconf
|
||||
, gtk3
|
||||
# options
|
||||
, libGLSupported ? stdenv.isLinux
|
||||
, libGLSupported ? stdenv.hostPlatform.isLinux
|
||||
, libGL
|
||||
, debug ? false
|
||||
, developerBuild ? false
|
||||
@ -132,7 +132,7 @@ stdenv.mkDerivation rec {
|
||||
unixODBCDrivers.mariadb
|
||||
] ++ lib.optionals systemdSupport [
|
||||
systemd
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
util-linux
|
||||
mtdev
|
||||
lksctp-tools
|
||||
@ -165,7 +165,7 @@ stdenv.mkDerivation rec {
|
||||
xorg.libXtst
|
||||
xorg.xcbutilcursor
|
||||
libepoxy
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
AGL
|
||||
AVFoundation
|
||||
AppKit
|
||||
@ -178,9 +178,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [
|
||||
at-spi2-core
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
libinput
|
||||
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
||||
] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
|
||||
AppKit
|
||||
CoreBluetooth
|
||||
]
|
||||
@ -191,7 +191,7 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optional (postgresql != null) postgresql;
|
||||
|
||||
nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ]
|
||||
++ lib.optionals stdenv.isDarwin [ moveBuildTree ];
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ];
|
||||
|
||||
propagatedNativeBuildInputs = [ lndir ];
|
||||
|
||||
@ -204,7 +204,7 @@ stdenv.mkDerivation rec {
|
||||
# https://bugreports.qt.io/browse/QTBUG-97568
|
||||
postPatch = ''
|
||||
substituteInPlace src/corelib/CMakeLists.txt --replace-fail "/bin/ls" "${coreutils}/bin/ls"
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace cmake/QtPublicAppleHelpers.cmake --replace-fail "/usr/bin/xcrun" "${xcbuild}/bin/xcrun"
|
||||
'';
|
||||
|
||||
@ -225,16 +225,16 @@ stdenv.mkDerivation rec {
|
||||
"-DQT_FEATURE_libproxy=ON"
|
||||
"-DQT_FEATURE_system_sqlite=ON"
|
||||
"-DQT_FEATURE_openssl_linked=ON"
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
"-DQT_FEATURE_sctp=ON"
|
||||
"-DQT_FEATURE_journald=${if systemdSupport then "ON" else "OFF"}"
|
||||
"-DQT_FEATURE_vulkan=ON"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# error: 'path' is unavailable: introduced in macOS 10.15
|
||||
"-DQT_FEATURE_cxx17_filesystem=OFF"
|
||||
] ++ lib.optional (qttranslations != null) "-DINSTALL_TRANSLATIONSDIR=${qttranslations}/translations";
|
||||
|
||||
env.NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [
|
||||
env.NIX_LDFLAGS = toString (lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Undefined symbols for architecture arm64: "___gss_c_nt_hostbased_service_oid_desc"
|
||||
"-framework GSS"
|
||||
]);
|
||||
|
@ -12,11 +12,11 @@
|
||||
qtModule {
|
||||
pname = "qtconnectivity";
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = lib.optionals stdenv.isLinux [ bluez ];
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ bluez ];
|
||||
propagatedBuildInputs = [
|
||||
qtbase
|
||||
qtdeclarative
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
IOBluetooth
|
||||
PCSC
|
||||
];
|
||||
|
@ -28,15 +28,15 @@ qtModule {
|
||||
pname = "qtmultimedia";
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libunwind orc ffmpeg_6 ]
|
||||
++ lib.optionals stdenv.isLinux [ libpulseaudio elfutils alsa-lib wayland libXrandr libva ];
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio elfutils alsa-lib wayland libXrandr libva ];
|
||||
propagatedBuildInputs = [ qtbase qtdeclarative qtsvg qtshadertools qtquick3d ]
|
||||
++ lib.optionals stdenv.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ]
|
||||
++ lib.optionals stdenv.isDarwin [ VideoToolbox ];
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ VideoToolbox ];
|
||||
|
||||
cmakeFlags = [ "-DENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS=0" ];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin
|
||||
"-include AudioToolbox/AudioToolbox.h";
|
||||
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin
|
||||
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin
|
||||
"-framework AudioToolbox";
|
||||
}
|
||||
|
@ -8,6 +8,6 @@
|
||||
qtModule {
|
||||
pname = "qtquick3dphysics";
|
||||
propagatedBuildInputs = [ qtbase qtquick3d ];
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64)
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64)
|
||||
"-faligned-allocation";
|
||||
}
|
||||
|
@ -9,5 +9,5 @@
|
||||
qtModule {
|
||||
pname = "qtserialport";
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
propagatedBuildInputs = [ qtbase ] ++ lib.optionals stdenv.isLinux [ udev ];
|
||||
propagatedBuildInputs = [ qtbase ] ++ lib.optionals stdenv.hostPlatform.isLinux [ udev ];
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
qtModule {
|
||||
pname = "qtspeech";
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = lib.optionals stdenv.isLinux [ flite alsa-lib speechd ];
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ flite alsa-lib speechd ];
|
||||
propagatedBuildInputs = [ qtbase qtmultimedia ]
|
||||
++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa ];
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ qtModule {
|
||||
llvmPackages.llvm
|
||||
];
|
||||
propagatedBuildInputs = [ qtbase qtdeclarative ]
|
||||
++ lib.optionals stdenv.isDarwin [ cups ];
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ cups ];
|
||||
patches = [
|
||||
../patches/qttools-paths.patch
|
||||
];
|
||||
|
@ -105,9 +105,9 @@ qtModule {
|
||||
which
|
||||
gn
|
||||
nodejs
|
||||
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
|
||||
] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
|
||||
autoSignDarwinBinariesHook
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
bootstrap_cmds
|
||||
cctools
|
||||
xcbuild
|
||||
@ -158,14 +158,14 @@ qtModule {
|
||||
--replace "QLibraryInfo::path(QLibraryInfo::TranslationsPath)" "\"$out/translations\"" \
|
||||
--replace "QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)" "\"$out/libexec\""
|
||||
''
|
||||
+ lib.optionalString stdenv.isLinux ''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \
|
||||
src/3rdparty/chromium/device/udev_linux/udev?_loader.cc
|
||||
|
||||
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
|
||||
src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
|
||||
''
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace configure.cmake src/gn/CMakeLists.txt \
|
||||
--replace "AppleClang" "Clang"
|
||||
substituteInPlace cmake/Functions.cmake \
|
||||
@ -190,7 +190,7 @@ qtModule {
|
||||
# "-DQT_FEATURE_webengine_native_spellchecker=ON"
|
||||
"-DQT_FEATURE_webengine_sanitizer=ON"
|
||||
"-DQT_FEATURE_webengine_kerberos=ON"
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
"-DQT_FEATURE_webengine_system_libxml=ON"
|
||||
"-DQT_FEATURE_webengine_webrtc_pipewire=ON"
|
||||
|
||||
@ -199,7 +199,7 @@ qtModule {
|
||||
"-DQT_FEATURE_webengine_system_icu=ON"
|
||||
] ++ lib.optionals enableProprietaryCodecs [
|
||||
"-DQT_FEATURE_webengine_proprietary_codecs=ON"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinSdkVersion}"
|
||||
];
|
||||
|
||||
@ -232,7 +232,7 @@ qtModule {
|
||||
|
||||
libevent
|
||||
ffmpeg_4
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
dbus
|
||||
zlib
|
||||
minizip
|
||||
@ -275,7 +275,7 @@ qtModule {
|
||||
|
||||
libkrb5
|
||||
mesa
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
AGL
|
||||
AVFoundation
|
||||
Accelerate
|
||||
@ -302,7 +302,7 @@ qtModule {
|
||||
|
||||
buildInputs = [
|
||||
cups
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libpm
|
||||
sandbox
|
||||
];
|
||||
|
@ -9,6 +9,6 @@
|
||||
qtModule {
|
||||
pname = "qtwebview";
|
||||
propagatedBuildInputs = [ qtdeclarative ]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ qtwebengine ]
|
||||
++ lib.optionals stdenv.isDarwin [ WebKit ];
|
||||
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ qtwebengine ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ WebKit ];
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation (args // {
|
||||
|
||||
buildInputs = args.buildInputs or [ ];
|
||||
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]
|
||||
++ lib.optionals stdenv.isDarwin [ moveBuildTree ];
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ];
|
||||
propagatedBuildInputs =
|
||||
(lib.warnIf (args ? qtInputs) "qt6.qtModule's qtInputs argument is deprecated" args.qtInputs or []) ++
|
||||
(args.propagatedBuildInputs or []);
|
||||
|
Loading…
Reference in New Issue
Block a user