Skip to content

Commit

Permalink
wireplumber: 0.4.17 -> 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
K900 committed Mar 18, 2024
1 parent fccb6b4 commit 823897d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
30 changes: 17 additions & 13 deletions nixos/modules/services/desktops/pipewire/wireplumber.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,28 @@ in

config =
let
pwNotForAudioConfigPkg = pkgs.writeTextDir "share/wireplumber/main.lua.d/80-pw-not-for-audio.lua" ''
-- PipeWire is not used for audio, so prevent it from grabbing audio devices
alsa_monitor.enable = function() end
'';
systemwideConfigPkg = pkgs.writeTextDir "share/wireplumber/main.lua.d/80-systemwide.lua" ''
-- When running system-wide, these settings need to be disabled (they
-- use functions that aren't available on the system dbus).
alsa_monitor.properties["alsa.reserve"] = false
default_access.properties["enable-flatpak-portal"] = false
pwNotForAudioConfigPkg = pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/90-nixos-no-audio.conf" ''
# PipeWire is not used for audio, so WirePlumber should not be handling it
wireplumber.profiles = {
main = {
hardware.audio = disabled
hardware.bluetooth = disabled
}
}
'';
systemwideBluetoothConfigPkg = pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/80-systemwide.lua" ''
-- When running system-wide, logind-integration needs to be disabled.
bluez_monitor.properties["with-logind"] = false

systemwideConfigPkg = pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/90-nixos-systemwide.conf" ''
# When running system-wide, we don't have logind to call ReserveDevice
wireplumber.profiles = {
main = {
support.reserve-device = disabled
}
}
'';

configPackages = cfg.configPackages
++ lib.optional (!pwUsedForAudio) pwNotForAudioConfigPkg
++ lib.optionals config.services.pipewire.systemWide [ systemwideConfigPkg systemwideBluetoothConfigPkg ];
++ lib.optional config.services.pipewire.systemWide systemwideConfigPkg;

configs = pkgs.buildEnv {
name = "wireplumber-configs";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/pipewire/wireplumber.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

stdenv.mkDerivation rec {
pname = "wireplumber";
version = "0.4.17";
version = "0.5.0";

outputs = [ "out" "dev" ] ++ lib.optional enableDocs "doc";

Expand All @@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
owner = "pipewire";
repo = "wireplumber";
rev = version;
hash = "sha256-vhpQT67+849WV1SFthQdUeFnYe/okudTQJoL3y+wXwI=";
hash = "sha256-zcYZvyGsGuiwuL9nOD5mW6RFwa9cPB9HvoQqdw2jlmY=";
};

nativeBuildInputs = [
Expand Down

2 comments on commit 823897d

@Lillecarl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks waybar. I tried replacing wireplumber-4.0 with wireplumber-5.0 but ran into

FAILED: waybar.p/src_modules_wireplumber.cpp.o 
g++ -Iwaybar.p -I. -I.. -I../include -I../subprojects/cava-0.9.1/include -Iprotocol -I/nix/store/qljvpa4lhj2qsnfsdwbai99lqjs81bqs-wayland-1.22.0-dev/include -I/nix/store/xn0pf5vxww9k5kjh5bliafbiq2bzk4hk-fmt-10.2.
In file included from /nix/store/905larf7js32s4pshc247rclshjp2103-wireplumber-0.5.0-dev/include/wireplumber-0.5/wp/wp.h:25,
                 from ../include/modules/wireplumber.hpp:4,
                 from ../src/modules/wireplumber.cpp:1:
/nix/store/905larf7js32s4pshc247rclshjp2103-wireplumber-0.5.0-dev/include/wireplumber-0.5/wp/log.h: In function 'gboolean wp_log_topic_is_enabled(WpLogTopic*, GLogLevelFlags)':
/nix/store/905larf7js32s4pshc247rclshjp2103-wireplumber-0.5.0-dev/include/wireplumber-0.5/wp/log.h:112:24: warning: bitwise operation between different enumeration types 'WpLogTopicFlags' and 'GLogLevelFlags' is 
  112 |   return (topic->flags & log_level & WP_LOG_TOPIC_LEVEL_MASK) != 0;
      |           ~~~~~~~~~~~~~^~~~~~~~~~~
../src/modules/wireplumber.cpp: In constructor 'waybar::modules::Wireplumber::Wireplumber(const std::string&, const Json::Value&)':
../src/modules/wireplumber.cpp:21:25: error: too few arguments to function 'WpCore* wp_core_new(GMainContext*, WpConf*, WpProperties*)'
   21 |   wp_core_ = wp_core_new(NULL, NULL);
      |              ~~~~~~~~~~~^~~~~~~~~~~~
In file included from /nix/store/905larf7js32s4pshc247rclshjp2103-wireplumber-0.5.0-dev/include/wireplumber-0.5/wp/wp.h:16:
/nix/store/905larf7js32s4pshc247rclshjp2103-wireplumber-0.5.0-dev/include/wireplumber-0.5/wp/core.h:45:10: note: declared here
   45 | WpCore * wp_core_new (GMainContext * context, WpConf * conf,
      |          ^~~~~~~~~~~
../src/modules/wireplumber.cpp: In member function 'void waybar::modules::Wireplumber::loadRequiredApiModules()':                                                                                                   
../src/modules/wireplumber.cpp:258:31: error: cannot convert 'GError**' {aka '_GError**'} to 'const gchar*' {aka 'const char*'}                                                                                     
  258 |                               &error)) {                                                                                                                                                                    
      |                               ^~~~~~                                                                                                                                                                        
      |                               |                                                                                                                                                                             
      |                               GError** {aka _GError**}                                                                                                                                                      
In file included from /nix/store/905larf7js32s4pshc247rclshjp2103-wireplumber-0.5.0-dev/include/wireplumber-0.5/wp/wp.h:14:                                                                                         
/nix/store/905larf7js32s4pshc247rclshjp2103-wireplumber-0.5.0-dev/include/wireplumber-0.5/wp/component-loader.h:45:57: note:   initializing argument 5 of 'void wp_core_load_component(WpCore*, const gchar*, const 
   45 |     const gchar * type, WpSpaJson * args, const gchar * provides,                                                                                                                                           
      |                                           ~~~~~~~~~~~~~~^~~~~~~~                                                                                                                                            
../src/modules/wireplumber.cpp:263:31: error: cannot convert 'GError**' {aka '_GError**'} to 'const gchar*' {aka 'const char*'}                                                                                     
  263 |                               &error)) {                                                                                                                                                                    
      |                               ^~~~~~                                                                                                                                                                        
      |                               |                                                                                                                                                                             
      |                               GError** {aka _GError**}                                                                                                                                                      
/nix/store/905larf7js32s4pshc247rclshjp2103-wireplumber-0.5.0-dev/include/wireplumber-0.5/wp/component-loader.h:45:57: note:   initializing argument 5 of 'void wp_core_load_component(WpCore*, const gchar*, const 
   45 |     const gchar * type, WpSpaJson * args, const gchar * provides,                                                                                                                                           
      |                                           ~~~~~~~~~~~~~~^~~~~~~~                                                                                                                                            

So that doesn't work either.

@Lillecarl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

      package = pkgs.waybar.override { wireplumberSupport = false; };

works just fine though, for those who doesn't use wireplumber in waybar πŸ˜„

Please sign in to comment.