diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-02-22 10:43:06 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-03-11 16:17:56 +0000 |
commit | ca1aada113c0ebda1ab8667199f6453f8e01c4fc (patch) | |
tree | 55e402280096f62eb0bc8bcad5ce6050c5a0aec7 /nixpkgs/pkgs/development/libraries/pipewire | |
parent | e4df5a52a6a6531f32626f57205356a773ac2975 (diff) | |
parent | 93883402a445ad467320925a0a5dbe43a949f25b (diff) | |
download | nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.gz nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.bz2 nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.lz nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.xz nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.tar.zst nixlib-ca1aada113c0ebda1ab8667199f6453f8e01c4fc.zip |
Merge commit '93883402a445ad467320925a0a5dbe43a949f25b'
Conflicts: nixpkgs/nixos/modules/programs/ssh.nix nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix nixpkgs/pkgs/data/fonts/noto-fonts/default.nix nixpkgs/pkgs/development/go-modules/generic/default.nix nixpkgs/pkgs/development/interpreters/ruby/default.nix nixpkgs/pkgs/development/libraries/mesa/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/pipewire')
5 files changed, 159 insertions, 32 deletions
diff --git a/nixpkgs/pkgs/development/libraries/pipewire/0050-pipewire-pulse-path.patch b/nixpkgs/pkgs/development/libraries/pipewire/0050-pipewire-pulse-path.patch index 84238bf6e5aa..230f1b30394a 100644 --- a/nixpkgs/pkgs/development/libraries/pipewire/0050-pipewire-pulse-path.patch +++ b/nixpkgs/pkgs/development/libraries/pipewire/0050-pipewire-pulse-path.patch @@ -1,19 +1,19 @@ diff --git a/meson_options.txt b/meson_options.txt -index 71c2e35e9..a0f380c04 100644 +index 961ae2a76..692b84dfd 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -176,6 +176,9 @@ option('udev', +@@ -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-user-unit-dir', + option('systemd-system-unit-dir', type : 'string', - description : 'Directory for user systemd units (defaults to /usr/lib/systemd/user)') + 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 5bd134537..5a3ca9ed5 100644 +index d17f3794f..34afe4f1a 100644 --- a/src/daemon/systemd/user/meson.build +++ b/src/daemon/systemd/user/meson.build @@ -9,7 +9,7 @@ install_data( diff --git a/nixpkgs/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch b/nixpkgs/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch index ea968e28ea89..b4c9f8ed2aab 100644 --- a/nixpkgs/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch +++ b/nixpkgs/pkgs/development/libraries/pipewire/0090-pipewire-config-template-paths.patch @@ -1,8 +1,28 @@ +diff --git a/src/daemon/minimal.conf.in b/src/daemon/minimal.conf.in +index 6464839a0..05546201f 100644 +--- a/src/daemon/minimal.conf.in ++++ b/src/daemon/minimal.conf.in +@@ -110,7 +110,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. +@@ -298,5 +298,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 648e13069..50f767f0c 100644 +index a948a1b9b..4ece43c6f 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in -@@ -131,7 +131,7 @@ context.modules = [ +@@ -132,7 +132,7 @@ context.modules = [ # access.allowed to list an array of paths of allowed # apps. #access.allowed = [ @@ -11,7 +31,7 @@ index 648e13069..50f767f0c 100644 #] # An array of rejected paths. -@@ -235,12 +235,12 @@ context.exec = [ +@@ -246,12 +246,12 @@ context.exec = [ # but it is better to start it as a systemd service. # Run the session manager with -h for options. # diff --git a/nixpkgs/pkgs/development/libraries/pipewire/default.nix b/nixpkgs/pkgs/development/libraries/pipewire/default.nix index af5f238c9df7..79682d7ace81 100644 --- a/nixpkgs/pkgs/development/libraries/pipewire/default.nix +++ b/nixpkgs/pkgs/development/libraries/pipewire/default.nix @@ -2,6 +2,7 @@ , lib , buildPackages , fetchFromGitLab +, fetchpatch , removeReferencesTo , python3 , meson @@ -26,7 +27,6 @@ , ncurses , readline81 # meson can't find <7 as those versions don't have a .pc file , lilv -, openssl , makeFontsConf , callPackage , nixosTests @@ -54,19 +54,22 @@ , libpulseaudio , zeroconfSupport ? true , avahi +, raopSupport ? true +, openssl +, rocSupport ? true +, roc-toolkit +, x11Support ? true +, libcanberra +, xorg }: let - fontsConf = makeFontsConf { - fontDirectories = [ ]; - }; - - mesonEnable = b: if b then "enabled" else "disabled"; + mesonEnableFeature = b: if b then "enabled" else "disabled"; mesonList = l: "[" + lib.concatStringsSep "," l + "]"; self = stdenv.mkDerivation rec { pname = "pipewire"; - version = "0.3.42"; + version = "0.3.45"; outputs = [ "out" @@ -84,7 +87,7 @@ let owner = "pipewire"; repo = "pipewire"; rev = version; - sha256 = "sha256-Iyd5snOt+iCT7W0+FlfvhMUZo/gF+zr9JX4HIGVdHto="; + sha256 = "sha256-OnQd98qfOekAsVXLbciZLNPrM84KBX6fOx/f8y2BYI0="; }; patches = [ @@ -121,7 +124,6 @@ let libsndfile lilv ncurses - openssl readline81 udev vulkan-headers @@ -134,7 +136,10 @@ let ++ lib.optional ffmpegSupport ffmpeg ++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt sbc fdk_aac ] ++ lib.optional pulseTunnelSupport libpulseaudio - ++ lib.optional zeroconfSupport avahi; + ++ lib.optional zeroconfSupport avahi + ++ lib.optional raopSupport openssl + ++ lib.optional rocSupport roc-toolkit + ++ lib.optionals x11Support [ libcanberra xorg.libxcb ]; # Valgrind binary is required for running one optional test. checkInputs = lib.optional withValgrind valgrind; @@ -146,32 +151,34 @@ let "-Dinstalled_test_prefix=${placeholder "installedTests"}" "-Dpipewire_pulse_prefix=${placeholder "pulse"}" "-Dlibjack-path=${placeholder "jack"}/lib" - "-Dlibcamera=${mesonEnable libcameraSupport}" - "-Droc=disabled" - "-Dlibpulse=${mesonEnable pulseTunnelSupport}" - "-Davahi=${mesonEnable zeroconfSupport}" - "-Dgstreamer=${mesonEnable gstreamerSupport}" - "-Dffmpeg=${mesonEnable ffmpegSupport}" - "-Dbluez5=${mesonEnable bluezSupport}" - "-Dbluez5-backend-hsp-native=${mesonEnable nativeHspSupport}" - "-Dbluez5-backend-hfp-native=${mesonEnable nativeHfpSupport}" - "-Dbluez5-backend-ofono=${mesonEnable ofonoSupport}" - "-Dbluez5-backend-hsphfpd=${mesonEnable hsphfpdSupport}" + "-Dlibcamera=${mesonEnableFeature libcameraSupport}" + "-Droc=${mesonEnableFeature rocSupport}" + "-Dlibpulse=${mesonEnableFeature pulseTunnelSupport}" + "-Davahi=${mesonEnableFeature zeroconfSupport}" + "-Dgstreamer=${mesonEnableFeature gstreamerSupport}" + "-Dsystemd-system-service=enabled" + "-Dffmpeg=${mesonEnableFeature ffmpegSupport}" + "-Dbluez5=${mesonEnableFeature bluezSupport}" + "-Dbluez5-backend-hsp-native=${mesonEnableFeature nativeHspSupport}" + "-Dbluez5-backend-hfp-native=${mesonEnableFeature nativeHfpSupport}" + "-Dbluez5-backend-ofono=${mesonEnableFeature ofonoSupport}" + "-Dbluez5-backend-hsphfpd=${mesonEnableFeature hsphfpdSupport}" "-Dsysconfdir=/etc" "-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire" + "-Draop=${mesonEnableFeature raopSupport}" "-Dsession-managers=" "-Dvulkan=enabled" + "-Dx11=${mesonEnableFeature x11Support}" ]; - FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file + # Fontconfig error: Cannot load default config file + FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; }; doCheck = true; postUnpack = '' - patchShebangs source/doc/strip-static.sh patchShebangs source/doc/input-filter.sh patchShebangs source/doc/input-filter-h.sh - patchShebangs source/spa/tests/gen-cpp-test.py ''; postInstall = '' @@ -191,6 +198,8 @@ let moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse" moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse" moveToOutput "bin/pipewire-pulse" "$pulse" + + moveToOutput "bin/pw-jack" "$jack" ''; passthru = { diff --git a/nixpkgs/pkgs/development/libraries/pipewire/media-session.nix b/nixpkgs/pkgs/development/libraries/pipewire/media-session.nix index 47cb3b415956..19940d8d7477 100644 --- a/nixpkgs/pkgs/development/libraries/pipewire/media-session.nix +++ b/nixpkgs/pkgs/development/libraries/pipewire/media-session.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchFromGitLab +, fetchpatch , meson , ninja , pkg-config @@ -30,6 +31,19 @@ let sha256 = "sha256-e537gTkiNYMz2YJrOff/MXYWVDgHZDkqkSn8Qh+7Wr4="; }; + patches = [ + # Fix `ERROR: Tried to access unknown option "session-managers".` + (fetchpatch { + url = "https://gitlab.freedesktop.org/pipewire/media-session/-/commit/dfa740175c83e1cd0d815ad423f90872de566437.diff"; + sha256 = "01rfwq8ipm8wyv98rxal1s5zrkf0pn9hgrngiq2wdbwj6vjdnr1h"; + }) + # Fix attempt to put system service units into pkgs.systemd. + (fetchpatch { + url = "https://gitlab.freedesktop.org/pipewire/media-session/-/commit/2ff6b0baec7325dde229013b9d37c93f8bc7edee.diff"; + sha256 = "18gg7ca04ihl4ylnw78wdyrbvg66m8w43gg0wp258x4nv95gpps2"; + }) + ]; + nativeBuildInputs = [ doxygen graphviz @@ -48,6 +62,7 @@ let mesonFlags = [ "-Ddocs=enabled" + "-Dsystemd-system-service=enabled" # We generate these empty files from the nixos module, don't bother installing them "-Dwith-module-sets=[]" ]; diff --git a/nixpkgs/pkgs/development/libraries/pipewire/wireplumber.nix b/nixpkgs/pkgs/development/libraries/pipewire/wireplumber.nix new file mode 100644 index 000000000000..9ab197278d0a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/pipewire/wireplumber.nix @@ -0,0 +1,83 @@ +{ lib +, stdenv +, fetchFromGitLab +, fetchpatch +, nix-update-script +, # base build deps + meson +, pkg-config +, ninja +, # docs build deps + python3 +, doxygen +, graphviz +, # GI build deps + gobject-introspection +, # runtime deps + glib +, systemd +, lua5_4 +, pipewire +, # options + enableDocs ? true +, enableGI ? stdenv.hostPlatform == stdenv.buildPlatform +}: +let + mesonEnableFeature = b: if b then "enabled" else "disabled"; +in +stdenv.mkDerivation rec { + pname = "wireplumber"; + version = "0.4.8"; + + outputs = [ "out" "dev" ] ++ lib.optional enableDocs "doc"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "pipewire"; + repo = "wireplumber"; + rev = version; + sha256 = "sha256-xwfggrjKHh5mZdvH6dKqQo6o1ltxuYdjoGYaWl31C/Y="; + }; + + nativeBuildInputs = [ + meson + pkg-config + ninja + ] ++ lib.optionals enableDocs [ + graphviz + ] ++ lib.optionals enableGI [ + gobject-introspection + ] ++ lib.optionals (enableDocs || enableGI) [ + doxygen + (python3.withPackages (ps: with ps; + lib.optionals enableDocs [ sphinx sphinx_rtd_theme breathe ] ++ + lib.optionals enableGI [ lxml ] + )) + ]; + + buildInputs = [ + glib + systemd + lua5_4 + pipewire + ]; + + mesonFlags = [ + "-Dsystem-lua=true" + "-Delogind=disabled" + "-Ddoc=${mesonEnableFeature enableDocs}" + "-Dintrospection=${mesonEnableFeature enableGI}" + ]; + + passthru.updateScript = nix-update-script { + attrPath = pname; + }; + + meta = with lib; { + description = "A modular session / policy manager for PipeWire"; + homepage = "https://pipewire.org"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ k900 ]; + }; +} |