9 , enableSystemd ? true # enableSystemd=false maintained by maintainers.qyliss.
21 , vulkanSupport ? true
24 , webrtc-audio-processing
25 , webrtc-audio-processing_1
27 , readline # meson can't find <7 as those versions don't have a .pc file
45 , zeroconfSupport ? true
55 , ffadoSupport ? x11Support && lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform
60 stdenv.mkDerivation(finalAttrs: {
73 src = fetchFromGitLab {
74 domain = "gitlab.freedesktop.org";
77 rev = finalAttrs.version;
78 sha256 = "sha256-AmrbA1YQBeETLC9u9rQ2f85rG9TASvcbCZ/Xlz7ICdY=";
82 # Load libjack from a known location
83 ./0060-libjack-path.patch
84 # Move installed tests into their own output.
85 ./0070-installed-tests-path.patch
107 gst_all_1.gst-plugins-base
124 ] ++ (if enableSystemd then [ systemd ] else [ elogind udev ])
125 ++ (if lib.meta.availableOn stdenv.hostPlatform webrtc-audio-processing_1 then [ webrtc-audio-processing_1 ] else [ webrtc-audio-processing ])
126 ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform ldacbt) ldacbt
127 ++ lib.optional zeroconfSupport avahi
128 ++ lib.optional raopSupport openssl
129 ++ lib.optional rocSupport roc-toolkit
130 ++ lib.optionals vulkanSupport [ libdrm vulkan-headers vulkan-loader ]
131 ++ lib.optionals x11Support [ libcanberra xorg.libX11 xorg.libXfixes ]
132 ++ lib.optional ffadoSupport ffado;
134 # Valgrind binary is required for running one optional test.
135 nativeCheckInputs = lib.optional (lib.meta.availableOn stdenv.hostPlatform valgrind) valgrind;
138 (lib.mesonEnable "docs" true)
139 (lib.mesonOption "udevrulesdir" "lib/udev/rules.d")
140 (lib.mesonEnable "installed_tests" true)
141 (lib.mesonOption "installed_test_prefix" (placeholder "installedTests"))
142 (lib.mesonOption "libjack-path" "${placeholder "jack"}/lib")
143 (lib.mesonEnable "libcamera" true)
144 (lib.mesonEnable "libffado" ffadoSupport)
145 (lib.mesonEnable "roc" rocSupport)
146 (lib.mesonEnable "libpulse" true)
147 (lib.mesonEnable "avahi" zeroconfSupport)
148 (lib.mesonEnable "gstreamer" true)
149 (lib.mesonEnable "gstreamer-device-provider" true)
150 (lib.mesonOption "logind-provider" (if enableSystemd then "libsystemd" else "libelogind"))
151 (lib.mesonEnable "systemd" enableSystemd)
152 (lib.mesonEnable "systemd-system-service" enableSystemd)
153 (lib.mesonEnable "udev" (!enableSystemd))
154 (lib.mesonEnable "ffmpeg" true)
155 (lib.mesonEnable "pw-cat-ffmpeg" true)
156 (lib.mesonEnable "bluez5" true)
157 (lib.mesonEnable "bluez5-backend-hsp-native" true)
158 (lib.mesonEnable "bluez5-backend-hfp-native" true)
159 (lib.mesonEnable "bluez5-backend-native-mm" true)
160 (lib.mesonEnable "bluez5-backend-ofono" true)
161 (lib.mesonEnable "bluez5-backend-hsphfpd" true)
162 # source code is not easily obtainable
163 (lib.mesonEnable "bluez5-codec-lc3plus" false)
164 (lib.mesonEnable "bluez5-codec-lc3" true)
165 (lib.mesonEnable "bluez5-codec-ldac" (lib.meta.availableOn stdenv.hostPlatform ldacbt))
166 (lib.mesonEnable "opus" true)
167 (lib.mesonOption "sysconfdir" "/etc")
168 (lib.mesonEnable "raop" raopSupport)
169 (lib.mesonOption "session-managers" "")
170 (lib.mesonEnable "vulkan" vulkanSupport)
171 (lib.mesonEnable "x11" x11Support)
172 (lib.mesonEnable "x11-xfixes" x11Support)
173 (lib.mesonEnable "libcanberra" x11Support)
174 (lib.mesonEnable "libmysofa" true)
175 (lib.mesonEnable "sdl2" false) # required only to build examples, causes dependency loop
176 (lib.mesonBool "rlimits-install" false) # installs to /etc, we won't use this anyway
177 (lib.mesonEnable "compress-offload" true)
178 (lib.mesonEnable "man" true)
179 (lib.mesonEnable "snap" false) # we don't currently have a working snapd
182 # Fontconfig error: Cannot load default config file
183 FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
188 patchShebangs source/doc/*.py
189 patchShebangs source/doc/input-filter-h.sh
193 moveToOutput "bin/pw-jack" "$jack"
196 passthru.tests.installed-tests = nixosTests.installed-tests.pipewire;
199 description = "Server and user space API to deal with multimedia pipelines";
200 changelog = "https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/${finalAttrs.version}";
201 homepage = "https://pipewire.org/";
202 license = licenses.mit;
203 platforms = platforms.linux;
204 maintainers = with maintainers; [ kranzes k900 ];