Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request For Testing] pkgs: libpulseaudio -> libcardiacarrest; nixos: override when running PA daemon #36881

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nixos/modules/config/pulseaudio.nix
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ in {
source = writeText "libao.conf" "default_driver=pulse"; }
];

environment.sessionVariables.LD_LIBRARY_PATH =
[ "${getLib overriddenPackage}/lib" ];
Copy link
Member

Choose a reason for hiding this comment

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

I don't think using LD_LIBRARY_PATH is a good idea for achieving this. In systemd jobs and when the environment gets cleared/filtered (like with sudo), LD_LIBRARY_PATH won't be inherited and has to be set manually.

Have you explored a solution like mesa-drivers in /run/opengl-drivers? The problem with that approach is that NixOS will be needed for PA-based applications. Maybe the RUNPATH can be patched so they will fall back to libcardiacarrest?


# Allow PulseAudio to get realtime priority using rtkit.
security.rtkit.enable = true;

Expand Down
16 changes: 15 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12423,7 +12423,21 @@ with pkgs;
libpulseaudio = libpulseaudio-vanilla; # meta only
};

libpulseaudio = libpulseaudio-vanilla;
# See `longDescription` of `libcardiacarrest`. We use
# `libcardiacarrest` as our default `libpulse` implementation, NixOS
# then overrides it at run-time with `libpulseaudio-vanilla` via
# `LD_LIBRARY_PATH` when the user enables the daemon service.
#
# This way
# - users that don't run PulseAudio daemon benefit from smaller
# closure sizes,
# - users that don't run PulseAudio daemon and don't want to even
# link against `libpulseaudio-vanilla` for ethical, religious,
# and/or security reasons don't need to make any overrides and
# benefit from hydra cache,
# - while users that do run PulseAudio daemon don't really notice
# anything.
libpulseaudio = libcardiacarrest;

tomcat_connectors = callPackage ../servers/http/apache-modules/tomcat-connectors { };

Expand Down