summary refs log tree commit diff
path: root/pkgs/development/libraries/pipewire
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-10-20 00:41:55 +0300
committerK900 <me@0upti.me>2023-10-20 00:57:18 +0300
commitff44e8ab072deaaa234525dd42010cfa5c536de7 (patch)
tree4e29c955d39a86e6e260b856c84729cfa1dddd89 /pkgs/development/libraries/pipewire
parent249e31affe3dfb7f5211fb05c50b947104e16a69 (diff)
downloadnixpkgs-ff44e8ab072deaaa234525dd42010cfa5c536de7.tar
nixpkgs-ff44e8ab072deaaa234525dd42010cfa5c536de7.tar.gz
nixpkgs-ff44e8ab072deaaa234525dd42010cfa5c536de7.tar.bz2
nixpkgs-ff44e8ab072deaaa234525dd42010cfa5c536de7.tar.lz
nixpkgs-ff44e8ab072deaaa234525dd42010cfa5c536de7.tar.xz
nixpkgs-ff44e8ab072deaaa234525dd42010cfa5c536de7.tar.zst
nixpkgs-ff44e8ab072deaaa234525dd42010cfa5c536de7.zip
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.
Diffstat (limited to 'pkgs/development/libraries/pipewire')
-rw-r--r--pkgs/development/libraries/pipewire/0040-alsa-profiles-use-libdir.patch13
-rw-r--r--pkgs/development/libraries/pipewire/0050-pipewire-pulse-path.patch27
-rw-r--r--pkgs/development/libraries/pipewire/0080-pipewire-config-dir.patch30
-rw-r--r--pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch41
-rw-r--r--pkgs/development/libraries/pipewire/0095-spa-data-dir.patch12
-rw-r--r--pkgs/development/libraries/pipewire/default.nix25
6 files changed, 0 insertions, 148 deletions
diff --git a/pkgs/development/libraries/pipewire/0040-alsa-profiles-use-libdir.patch b/pkgs/development/libraries/pipewire/0040-alsa-profiles-use-libdir.patch
deleted file mode 100644
index fab89c4ffd9..00000000000
--- a/pkgs/development/libraries/pipewire/0040-alsa-profiles-use-libdir.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/meson.build b/meson.build
-index 99a4b2d1..d4a4cda7 100644
---- a/meson.build
-+++ b/meson.build
-@@ -55,7 +55,7 @@ endif
- 
- spa_plugindir = pipewire_libdir / spa_name
- 
--alsadatadir = pipewire_datadir / 'alsa-card-profile' / 'mixer'
-+alsadatadir = pipewire_libdir / '..' / 'share' / 'alsa-card-profile' / 'mixer'
- 
- pipewire_headers_dir = pipewire_name / 'pipewire'
- 
diff --git a/pkgs/development/libraries/pipewire/0050-pipewire-pulse-path.patch b/pkgs/development/libraries/pipewire/0050-pipewire-pulse-path.patch
deleted file mode 100644
index 230f1b30394..00000000000
--- a/pkgs/development/libraries/pipewire/0050-pipewire-pulse-path.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/meson_options.txt b/meson_options.txt
-index 961ae2a76..692b84dfd 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -179,6 +179,9 @@ option('udev',
- option('udevrulesdir',
-        type : 'string',
-        description : 'Directory for udev rules (defaults to /lib/udev/rules.d)')
-+option('pipewire_pulse_prefix',
-+       type : 'string',
-+       description: 'Install directory for the pipewire-pulse daemon')
- option('systemd-system-unit-dir',
-        type : 'string',
-        description : 'Directory for system systemd units (defaults to /usr/lib/systemd/system)')
-diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
-index d17f3794f..34afe4f1a 100644
---- a/src/daemon/systemd/user/meson.build
-+++ b/src/daemon/systemd/user/meson.build
-@@ -9,7 +9,7 @@ install_data(
- 
- systemd_config = configuration_data()
- systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
--systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse')
-+systemd_config.set('PW_PULSE_BINARY', get_option('pipewire_pulse_prefix') / 'bin/pipewire-pulse')
- 
- configure_file(input : 'pipewire.service.in',
-                output : 'pipewire.service',
diff --git a/pkgs/development/libraries/pipewire/0080-pipewire-config-dir.patch b/pkgs/development/libraries/pipewire/0080-pipewire-config-dir.patch
deleted file mode 100644
index b8d8fcb0f90..00000000000
--- a/pkgs/development/libraries/pipewire/0080-pipewire-config-dir.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/meson.build b/meson.build
-index b6b4553b..f21c29d8 100644
---- a/meson.build
-+++ b/meson.build
-@@ -37,7 +37,10 @@ pipewire_localedir = prefix / get_option('localedir')
- pipewire_sysconfdir = prefix / get_option('sysconfdir')
- 
- pipewire_configdir = pipewire_sysconfdir / 'pipewire'
--pipewire_confdatadir = pipewire_datadir / 'pipewire'
-+pipewire_confdatadir = get_option('pipewire_confdata_dir')
-+if pipewire_confdatadir == ''
-+  pipewire_confdatadir = pipewire_datadir / 'pipewire'
-+endif
- modules_install_dir = pipewire_libdir / pipewire_name
- 
- if host_machine.system() == 'linux'
-diff --git a/meson_options.txt b/meson_options.txt
-index 9bc33fcd..e4bd2dc1 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -61,6 +61,9 @@ option('jack-devel',
- option('libjack-path',
-        description: 'Where to install the libjack.so library',
-        type: 'string')
-+option('pipewire_confdata_dir',
-+       type: 'string',
-+       description: 'Directory for pipewire default configuration (defaults to /usr/share/pipewire)')
- option('spa-plugins',
-        description: 'Enable spa plugins integration',
-        type: 'feature',
diff --git a/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch b/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch
deleted file mode 100644
index ebf8a079c7c..00000000000
--- a/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/src/daemon/minimal.conf.in b/src/daemon/minimal.conf.in
-index 9c885a38f..c474eb45d 100644
---- a/src/daemon/minimal.conf.in
-+++ b/src/daemon/minimal.conf.in
-@@ -111,7 +111,7 @@ context.modules = [
-             # access.allowed to list an array of paths of allowed
-             # apps.
-             #access.allowed = [
--            #    @session_manager_path@
-+            #    <session_manager_path>
-             #]
- 
-             # An array of rejected paths.
-@@ -359,5 +359,5 @@ context.exec = [
-     # It can be interesting to start another daemon here that listens
-     # on another address with the -a option (eg. -a tcp:4713).
-     #
--    #@pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" }
-+    #@pulse_comment@{ path = "<pipewire_path>" args = "-c pipewire-pulse.conf" }
- ]
-diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
-index 697bf094d..3a7b54ddd 100644
---- a/src/daemon/pipewire.conf.in
-+++ b/src/daemon/pipewire.conf.in
-@@ -294,7 +294,7 @@ context.exec = [
-     # but it is better to start it as a systemd service.
-     # Run the session manager with -h for options.
-     #
--    @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@"
-+    @sm_comment@{ path = "<session_manager_path>" args = "@session_manager_args@"
-     @sm_comment@  condition = [ { exec.session-manager = null } { exec.session-manager = true } ] }
-     #
-     # You can optionally start the pulseaudio-server here as well
-@@ -302,6 +302,6 @@ context.exec = [
-     # It can be interesting to start another daemon here that listens
-     # on another address with the -a option (eg. -a tcp:4713).
-     #
--    @pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf"
-+    @pulse_comment@{ path = "<pipewire_path>" args = "-c pipewire-pulse.conf"
-     @pulse_comment@  condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] }
- ]
diff --git a/pkgs/development/libraries/pipewire/0095-spa-data-dir.patch b/pkgs/development/libraries/pipewire/0095-spa-data-dir.patch
deleted file mode 100644
index d8241a809f6..00000000000
--- a/pkgs/development/libraries/pipewire/0095-spa-data-dir.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/meson.build b/meson.build
-index 56599ebd1..3bed2d3e3 100644
---- a/meson.build
-+++ b/meson.build
-@@ -54,7 +54,7 @@ else
- endif
- 
- spa_plugindir = pipewire_libdir / spa_name
--spa_datadir = pipewire_datadir / spa_name
-+spa_datadir = pipewire_libdir / spa_name
- 
- alsadatadir = pipewire_datadir / 'alsa-card-profile' / 'mixer'
diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix
index cf472ad5ceb..05741652f46 100644
--- a/pkgs/development/libraries/pipewire/default.nix
+++ b/pkgs/development/libraries/pipewire/default.nix
@@ -85,8 +85,6 @@ let
 
     outputs = [
       "out"
-      "lib"
-      "pulse"
       "jack"
       "dev"
       "doc"
@@ -103,20 +101,10 @@ let
     };
 
     patches = [
-      # Break up a dependency cycle between outputs.
-      ./0040-alsa-profiles-use-libdir.patch
-      # Change the path of the pipewire-pulse binary in the service definition.
-      ./0050-pipewire-pulse-path.patch
       # Load libjack from a known location
       ./0060-libjack-path.patch
       # Move installed tests into their own output.
       ./0070-installed-tests-path.patch
-      # Add option for changing the config install directory
-      ./0080-pipewire-config-dir.patch
-      # Remove output paths from the comments in the config templates to break dependency cycles
-      ./0090-pipewire-config-template-paths.patch
-      # Place SPA data files in lib output to avoid dependency cycles
-      ./0095-spa-data-dir.patch
     ];
 
     strictDeps = true;
@@ -170,9 +158,7 @@ let
       "-Dudevrulesdir=lib/udev/rules.d"
       "-Dinstalled_tests=enabled"
       "-Dinstalled_test_prefix=${placeholder "installedTests"}"
-      "-Dpipewire_pulse_prefix=${placeholder "pulse"}"
       "-Dlibjack-path=${placeholder "jack"}/lib"
-      "-Dlibv4l2-path=${placeholder "out"}/lib"
       "-Dlibcamera=${mesonEnableFeature libcameraSupport}"
       "-Dlibffado=${mesonEnableFeature ffadoSupport}"
       "-Droc=${mesonEnableFeature rocSupport}"
@@ -181,7 +167,6 @@ let
       "-Dgstreamer=${mesonEnableFeature gstreamerSupport}"
       "-Dsystemd-system-service=${mesonEnableFeature enableSystemd}"
       "-Dudev=${mesonEnableFeature (!enableSystemd)}"
-      "-Dudevrulesdir=${placeholder "out"}/lib/udev/rules.d"
       "-Dffmpeg=${mesonEnableFeature ffmpegSupport}"
       "-Dbluez5=${mesonEnableFeature bluezSupport}"
       "-Dbluez5-backend-hsp-native=${mesonEnableFeature nativeHspSupport}"
@@ -194,7 +179,6 @@ let
       "-Dbluez5-codec-lc3=${mesonEnableFeature bluezSupport}"
       "-Dbluez5-codec-ldac=${mesonEnableFeature ldacbtSupport}"
       "-Dsysconfdir=/etc"
-      "-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire"
       "-Draop=${mesonEnableFeature raopSupport}"
       "-Dsession-managers="
       "-Dvulkan=enabled"
@@ -218,15 +202,6 @@ let
     '';
 
     postInstall = ''
-      ${lib.optionalString enableSystemd ''
-        moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse"
-        moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse"
-      ''}
-
-      rm $out/bin/pipewire-pulse
-      mkdir -p $pulse/bin
-      ln -sf $out/bin/pipewire $pulse/bin/pipewire-pulse
-
       moveToOutput "bin/pw-jack" "$jack"
     '';