lol

pipewire: simplify outputs drastically

This drops a whole bunch of patches we carry to avoid output cycles, at the cost of +1MB to closure size
on systems that don't already have Pipewire, which are becoming rarer and rarer.

K900 ff44e8ab 249e31af

+7 -156
+5 -6
nixos/modules/services/desktops/pipewire/pipewire.nix
··· 115 115 environment.systemPackages = [ cfg.package ] 116 116 ++ lib.optional cfg.jack.enable jack-libs; 117 117 118 - systemd.packages = [ cfg.package ] 119 - ++ lib.optional cfg.pulse.enable cfg.package.pulse; 118 + systemd.packages = [ cfg.package ]; 120 119 121 120 # PipeWire depends on DBUS but doesn't list it. Without this booting 122 121 # into a terminal results in the service crashing with an error. ··· 140 139 environment.etc."alsa/conf.d/49-pipewire-modules.conf" = mkIf cfg.alsa.enable { 141 140 text = '' 142 141 pcm_type.pipewire { 143 - libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ; 142 + libs.native = ${cfg.package}/lib/alsa-lib/libasound_module_pcm_pipewire.so ; 144 143 ${optionalString enable32BitAlsaPlugins 145 - "libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;"} 144 + "libs.32Bit = ${pkgs.pkgsi686Linux.pipewire}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;"} 146 145 } 147 146 ctl_type.pipewire { 148 - libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ; 147 + libs.native = ${cfg.package}/lib/alsa-lib/libasound_module_ctl_pipewire.so ; 149 148 ${optionalString enable32BitAlsaPlugins 150 - "libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;"} 149 + "libs.32Bit = ${pkgs.pkgsi686Linux.pipewire}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;"} 151 150 } 152 151 ''; 153 152 };
+1 -1
pkgs/applications/networking/browsers/firefox-bin/default.nix
··· 78 78 pciutils 79 79 ]; 80 80 appendRunpaths = [ 81 - "${pipewire.lib}/lib" 81 + "${pipewire}/lib" 82 82 ]; 83 83 # Firefox uses "relrhack" to manually process relocations from a fixed offset 84 84 patchelfFlags = [ "--no-clobber-old-sections" ];
-13
pkgs/development/libraries/pipewire/0040-alsa-profiles-use-libdir.patch
··· 1 - diff --git a/meson.build b/meson.build 2 - index 99a4b2d1..d4a4cda7 100644 3 - --- a/meson.build 4 - +++ b/meson.build 5 - @@ -55,7 +55,7 @@ endif 6 - 7 - spa_plugindir = pipewire_libdir / spa_name 8 - 9 - -alsadatadir = pipewire_datadir / 'alsa-card-profile' / 'mixer' 10 - +alsadatadir = pipewire_libdir / '..' / 'share' / 'alsa-card-profile' / 'mixer' 11 - 12 - pipewire_headers_dir = pipewire_name / 'pipewire' 13 -
-27
pkgs/development/libraries/pipewire/0050-pipewire-pulse-path.patch
··· 1 - diff --git a/meson_options.txt b/meson_options.txt 2 - index 961ae2a76..692b84dfd 100644 3 - --- a/meson_options.txt 4 - +++ b/meson_options.txt 5 - @@ -179,6 +179,9 @@ option('udev', 6 - option('udevrulesdir', 7 - type : 'string', 8 - description : 'Directory for udev rules (defaults to /lib/udev/rules.d)') 9 - +option('pipewire_pulse_prefix', 10 - + type : 'string', 11 - + description: 'Install directory for the pipewire-pulse daemon') 12 - option('systemd-system-unit-dir', 13 - type : 'string', 14 - description : 'Directory for system systemd units (defaults to /usr/lib/systemd/system)') 15 - diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build 16 - index d17f3794f..34afe4f1a 100644 17 - --- a/src/daemon/systemd/user/meson.build 18 - +++ b/src/daemon/systemd/user/meson.build 19 - @@ -9,7 +9,7 @@ install_data( 20 - 21 - systemd_config = configuration_data() 22 - systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire') 23 - -systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse') 24 - +systemd_config.set('PW_PULSE_BINARY', get_option('pipewire_pulse_prefix') / 'bin/pipewire-pulse') 25 - 26 - configure_file(input : 'pipewire.service.in', 27 - output : 'pipewire.service',
-30
pkgs/development/libraries/pipewire/0080-pipewire-config-dir.patch
··· 1 - diff --git a/meson.build b/meson.build 2 - index b6b4553b..f21c29d8 100644 3 - --- a/meson.build 4 - +++ b/meson.build 5 - @@ -37,7 +37,10 @@ pipewire_localedir = prefix / get_option('localedir') 6 - pipewire_sysconfdir = prefix / get_option('sysconfdir') 7 - 8 - pipewire_configdir = pipewire_sysconfdir / 'pipewire' 9 - -pipewire_confdatadir = pipewire_datadir / 'pipewire' 10 - +pipewire_confdatadir = get_option('pipewire_confdata_dir') 11 - +if pipewire_confdatadir == '' 12 - + pipewire_confdatadir = pipewire_datadir / 'pipewire' 13 - +endif 14 - modules_install_dir = pipewire_libdir / pipewire_name 15 - 16 - if host_machine.system() == 'linux' 17 - diff --git a/meson_options.txt b/meson_options.txt 18 - index 9bc33fcd..e4bd2dc1 100644 19 - --- a/meson_options.txt 20 - +++ b/meson_options.txt 21 - @@ -61,6 +61,9 @@ option('jack-devel', 22 - option('libjack-path', 23 - description: 'Where to install the libjack.so library', 24 - type: 'string') 25 - +option('pipewire_confdata_dir', 26 - + type: 'string', 27 - + description: 'Directory for pipewire default configuration (defaults to /usr/share/pipewire)') 28 - option('spa-plugins', 29 - description: 'Enable spa plugins integration', 30 - type: 'feature',
-41
pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch
··· 1 - diff --git a/src/daemon/minimal.conf.in b/src/daemon/minimal.conf.in 2 - index 9c885a38f..c474eb45d 100644 3 - --- a/src/daemon/minimal.conf.in 4 - +++ b/src/daemon/minimal.conf.in 5 - @@ -111,7 +111,7 @@ context.modules = [ 6 - # access.allowed to list an array of paths of allowed 7 - # apps. 8 - #access.allowed = [ 9 - - # @session_manager_path@ 10 - + # <session_manager_path> 11 - #] 12 - 13 - # An array of rejected paths. 14 - @@ -359,5 +359,5 @@ context.exec = [ 15 - # It can be interesting to start another daemon here that listens 16 - # on another address with the -a option (eg. -a tcp:4713). 17 - # 18 - - #@pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" } 19 - + #@pulse_comment@{ path = "<pipewire_path>" args = "-c pipewire-pulse.conf" } 20 - ] 21 - diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in 22 - index 697bf094d..3a7b54ddd 100644 23 - --- a/src/daemon/pipewire.conf.in 24 - +++ b/src/daemon/pipewire.conf.in 25 - @@ -294,7 +294,7 @@ context.exec = [ 26 - # but it is better to start it as a systemd service. 27 - # Run the session manager with -h for options. 28 - # 29 - - @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" 30 - + @sm_comment@{ path = "<session_manager_path>" args = "@session_manager_args@" 31 - @sm_comment@ condition = [ { exec.session-manager = null } { exec.session-manager = true } ] } 32 - # 33 - # You can optionally start the pulseaudio-server here as well 34 - @@ -302,6 +302,6 @@ context.exec = [ 35 - # It can be interesting to start another daemon here that listens 36 - # on another address with the -a option (eg. -a tcp:4713). 37 - # 38 - - @pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" 39 - + @pulse_comment@{ path = "<pipewire_path>" args = "-c pipewire-pulse.conf" 40 - @pulse_comment@ condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] } 41 - ]
-12
pkgs/development/libraries/pipewire/0095-spa-data-dir.patch
··· 1 - diff --git a/meson.build b/meson.build 2 - index 56599ebd1..3bed2d3e3 100644 3 - --- a/meson.build 4 - +++ b/meson.build 5 - @@ -54,7 +54,7 @@ else 6 - endif 7 - 8 - spa_plugindir = pipewire_libdir / spa_name 9 - -spa_datadir = pipewire_datadir / spa_name 10 - +spa_datadir = pipewire_libdir / spa_name 11 - 12 - alsadatadir = pipewire_datadir / 'alsa-card-profile' / 'mixer'
-25
pkgs/development/libraries/pipewire/default.nix
··· 85 85 86 86 outputs = [ 87 87 "out" 88 - "lib" 89 - "pulse" 90 88 "jack" 91 89 "dev" 92 90 "doc" ··· 103 101 }; 104 102 105 103 patches = [ 106 - # Break up a dependency cycle between outputs. 107 - ./0040-alsa-profiles-use-libdir.patch 108 - # Change the path of the pipewire-pulse binary in the service definition. 109 - ./0050-pipewire-pulse-path.patch 110 104 # Load libjack from a known location 111 105 ./0060-libjack-path.patch 112 106 # Move installed tests into their own output. 113 107 ./0070-installed-tests-path.patch 114 - # Add option for changing the config install directory 115 - ./0080-pipewire-config-dir.patch 116 - # Remove output paths from the comments in the config templates to break dependency cycles 117 - ./0090-pipewire-config-template-paths.patch 118 - # Place SPA data files in lib output to avoid dependency cycles 119 - ./0095-spa-data-dir.patch 120 108 ]; 121 109 122 110 strictDeps = true; ··· 170 158 "-Dudevrulesdir=lib/udev/rules.d" 171 159 "-Dinstalled_tests=enabled" 172 160 "-Dinstalled_test_prefix=${placeholder "installedTests"}" 173 - "-Dpipewire_pulse_prefix=${placeholder "pulse"}" 174 161 "-Dlibjack-path=${placeholder "jack"}/lib" 175 - "-Dlibv4l2-path=${placeholder "out"}/lib" 176 162 "-Dlibcamera=${mesonEnableFeature libcameraSupport}" 177 163 "-Dlibffado=${mesonEnableFeature ffadoSupport}" 178 164 "-Droc=${mesonEnableFeature rocSupport}" ··· 181 167 "-Dgstreamer=${mesonEnableFeature gstreamerSupport}" 182 168 "-Dsystemd-system-service=${mesonEnableFeature enableSystemd}" 183 169 "-Dudev=${mesonEnableFeature (!enableSystemd)}" 184 - "-Dudevrulesdir=${placeholder "out"}/lib/udev/rules.d" 185 170 "-Dffmpeg=${mesonEnableFeature ffmpegSupport}" 186 171 "-Dbluez5=${mesonEnableFeature bluezSupport}" 187 172 "-Dbluez5-backend-hsp-native=${mesonEnableFeature nativeHspSupport}" ··· 194 179 "-Dbluez5-codec-lc3=${mesonEnableFeature bluezSupport}" 195 180 "-Dbluez5-codec-ldac=${mesonEnableFeature ldacbtSupport}" 196 181 "-Dsysconfdir=/etc" 197 - "-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire" 198 182 "-Draop=${mesonEnableFeature raopSupport}" 199 183 "-Dsession-managers=" 200 184 "-Dvulkan=enabled" ··· 218 202 ''; 219 203 220 204 postInstall = '' 221 - ${lib.optionalString enableSystemd '' 222 - moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse" 223 - moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse" 224 - ''} 225 - 226 - rm $out/bin/pipewire-pulse 227 - mkdir -p $pulse/bin 228 - ln -sf $out/bin/pipewire $pulse/bin/pipewire-pulse 229 - 230 205 moveToOutput "bin/pw-jack" "$jack" 231 206 ''; 232 207
+1 -1
pkgs/games/steam/fhsenv.nix
··· 80 80 xorg.libXfixes 81 81 libGL 82 82 libva 83 - pipewire.lib 83 + pipewire 84 84 85 85 # steamwebhelper 86 86 harfbuzz