2022-06-16 17:23:12 +00:00
|
|
|
{ qtModule
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
2024-01-02 11:29:13 +00:00
|
|
|
, qtquick3d
|
2022-06-16 17:23:12 +00:00
|
|
|
, qtshadertools
|
|
|
|
, qtsvg
|
|
|
|
, pkg-config
|
|
|
|
, alsa-lib
|
|
|
|
, gstreamer
|
|
|
|
, gst-plugins-base
|
2022-11-21 17:40:18 +00:00
|
|
|
, gst-plugins-good
|
|
|
|
, gst-libav
|
|
|
|
, gst-vaapi
|
2024-01-02 11:29:13 +00:00
|
|
|
, ffmpeg_6
|
|
|
|
, libva
|
2022-06-16 17:23:12 +00:00
|
|
|
, libpulseaudio
|
|
|
|
, wayland
|
2024-01-02 11:29:13 +00:00
|
|
|
, libXrandr
|
2022-06-16 17:23:12 +00:00
|
|
|
, elfutils
|
|
|
|
, libunwind
|
|
|
|
, orc
|
2022-12-17 10:02:37 +00:00
|
|
|
, VideoToolbox
|
2024-04-21 15:54:59 +00:00
|
|
|
, pkgsBuildBuild
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
qtModule {
|
|
|
|
pname = "qtmultimedia";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2024-04-21 15:54:59 +00:00
|
|
|
buildInputs = [ ffmpeg_6 ]
|
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isMinGW) [ libunwind orc ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ libpulseaudio alsa-lib wayland libXrandr libva ]
|
|
|
|
++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [ elfutils ];
|
|
|
|
propagatedBuildInputs = [ qtbase qtdeclarative qtsvg qtshadertools ]
|
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isMinGW) [ qtquick3d ]
|
2024-02-29 20:09:43 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ VideoToolbox ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
patches = [
|
|
|
|
../patches/fix-qtgui-include-incorrect-case.patch
|
2024-06-05 15:53:02 +00:00
|
|
|
# Remove new constants since macOS 12+, since we build Qt with the macOS 11 SDK
|
|
|
|
../patches/qtmultimedia-darwin-revert-replace-deprecated-constant.patch
|
2024-05-15 15:35:15 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
|
2024-04-21 15:54:59 +00:00
|
|
|
../patches/qtmultimedia-windows-no-uppercase-libs.patch
|
|
|
|
../patches/qtmultimedia-windows-resolve-function-name.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DENABLE_DYNAMIC_RESOLVE_VAAPI_SYMBOLS=0"
|
|
|
|
"-DQt6ShaderToolsTools_DIR=${pkgsBuildBuild.qt6.qtshadertools}/lib/cmake/Qt6ShaderToolsTools"
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin
|
2022-12-17 10:02:37 +00:00
|
|
|
"-include AudioToolbox/AudioToolbox.h";
|
2024-02-29 20:09:43 +00:00
|
|
|
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin
|
2022-12-17 10:02:37 +00:00
|
|
|
"-framework AudioToolbox";
|
2022-06-16 17:23:12 +00:00
|
|
|
}
|