10 enableSystemd ? true, # enableSystemd=false maintained by maintainers.qyliss.
25 webrtc-audio-processing,
26 webrtc-audio-processing_1,
28 readline, # meson can't find <7 as those versions don't have a .pc file
46 zeroconfSupport ? true,
56 ffadoSupport ? x11Support && lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform,
61 stdenv.mkDerivation (finalAttrs: {
74 src = fetchFromGitLab {
75 domain = "gitlab.freedesktop.org";
78 rev = finalAttrs.version;
79 sha256 = "sha256-AmrbA1YQBeETLC9u9rQ2f85rG9TASvcbCZ/Xlz7ICdY=";
83 # Load libjack from a known location
84 ./0060-libjack-path.patch
85 # Move installed tests into their own output.
86 ./0070-installed-tests-path.patch
109 gst_all_1.gst-plugins-base
128 if enableSystemd then
137 if lib.meta.availableOn stdenv.hostPlatform webrtc-audio-processing_1 then
138 [ webrtc-audio-processing_1 ]
140 [ webrtc-audio-processing ]
142 ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform ldacbt) ldacbt
143 ++ lib.optional zeroconfSupport avahi
144 ++ lib.optional raopSupport openssl
145 ++ lib.optional rocSupport roc-toolkit
146 ++ lib.optionals vulkanSupport [
151 ++ lib.optionals x11Support [
156 ++ lib.optional ffadoSupport ffado;
158 # Valgrind binary is required for running one optional test.
159 nativeCheckInputs = lib.optional (lib.meta.availableOn stdenv.hostPlatform valgrind) valgrind;
162 (lib.mesonEnable "docs" true)
163 (lib.mesonOption "udevrulesdir" "lib/udev/rules.d")
164 (lib.mesonEnable "installed_tests" true)
165 (lib.mesonOption "installed_test_prefix" (placeholder "installedTests"))
166 (lib.mesonOption "libjack-path" "${placeholder "jack"}/lib")
167 (lib.mesonEnable "libcamera" true)
168 (lib.mesonEnable "libffado" ffadoSupport)
169 (lib.mesonEnable "roc" rocSupport)
170 (lib.mesonEnable "libpulse" true)
171 (lib.mesonEnable "avahi" zeroconfSupport)
172 (lib.mesonEnable "gstreamer" true)
173 (lib.mesonEnable "gstreamer-device-provider" true)
174 (lib.mesonOption "logind-provider" (if enableSystemd then "libsystemd" else "libelogind"))
175 (lib.mesonEnable "systemd" enableSystemd)
176 (lib.mesonEnable "systemd-system-service" enableSystemd)
177 (lib.mesonEnable "udev" (!enableSystemd))
178 (lib.mesonEnable "ffmpeg" true)
179 (lib.mesonEnable "pw-cat-ffmpeg" true)
180 (lib.mesonEnable "bluez5" true)
181 (lib.mesonEnable "bluez5-backend-hsp-native" true)
182 (lib.mesonEnable "bluez5-backend-hfp-native" true)
183 (lib.mesonEnable "bluez5-backend-native-mm" true)
184 (lib.mesonEnable "bluez5-backend-ofono" true)
185 (lib.mesonEnable "bluez5-backend-hsphfpd" true)
186 # source code is not easily obtainable
187 (lib.mesonEnable "bluez5-codec-lc3plus" false)
188 (lib.mesonEnable "bluez5-codec-lc3" true)
189 (lib.mesonEnable "bluez5-codec-ldac" (lib.meta.availableOn stdenv.hostPlatform ldacbt))
190 (lib.mesonEnable "opus" true)
191 (lib.mesonOption "sysconfdir" "/etc")
192 (lib.mesonEnable "raop" raopSupport)
193 (lib.mesonOption "session-managers" "")
194 (lib.mesonEnable "vulkan" vulkanSupport)
195 (lib.mesonEnable "x11" x11Support)
196 (lib.mesonEnable "x11-xfixes" x11Support)
197 (lib.mesonEnable "libcanberra" x11Support)
198 (lib.mesonEnable "libmysofa" true)
199 (lib.mesonEnable "sdl2" false) # required only to build examples, causes dependency loop
200 (lib.mesonBool "rlimits-install" false) # installs to /etc, we won't use this anyway
201 (lib.mesonEnable "compress-offload" true)
202 (lib.mesonEnable "man" true)
203 (lib.mesonEnable "snap" false) # we don't currently have a working snapd
206 # Fontconfig error: Cannot load default config file
207 FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
212 patchShebangs source/doc/*.py
213 patchShebangs source/doc/input-filter-h.sh
217 moveToOutput "bin/pw-jack" "$jack"
220 passthru.tests.installed-tests = nixosTests.installed-tests.pipewire;
223 description = "Server and user space API to deal with multimedia pipelines";
224 changelog = "https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/${finalAttrs.version}";
225 homepage = "https://pipewire.org/";
226 license = licenses.mit;
227 platforms = platforms.linux;
228 maintainers = with maintainers; [