1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{ qtModule
, lib
, stdenv
, qtbase
, qtdeclarative
, qtquick3d
, qtshadertools
, qtsvg
, pkg-config
, alsa-lib
, gstreamer
, gst-plugins-base
, gst-plugins-good
, gst-libav
, gst-vaapi
, ffmpeg_6
, libva
, libpulseaudio
, wayland
, libXrandr
, elfutils
, libunwind
, orc
, VideoToolbox
, pkgsBuildBuild
}:
qtModule {
pname = "qtmultimedia";
nativeBuildInputs = [ pkg-config ];
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 ]
++ lib.optionals stdenv.hostPlatform.isLinux [ gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ VideoToolbox ];
patches = [
../patches/fix-qtgui-include-incorrect-case.patch
# Remove new constants since macOS 12+, since we build Qt with the macOS 11 SDK
../patches/qtmultimedia-darwin-revert-replace-deprecated-constant.patch
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
../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"
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin
"-include AudioToolbox/AudioToolbox.h";
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin
"-framework AudioToolbox";
}
|