NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.6k stars 13.75k forks source link

Remove `nixpkgs.config.pulseaudio`; build packages with Pulse support by default #139344

Open colemickens opened 3 years ago

colemickens commented 3 years ago

Describe the bug

I don't have a bunch of time to write this all out elegantly but I wanted to start the discussion somewhere more permanent than Matrix.

nixpkgs.config.pulseaudio recently caused some nixos-unstable-branch users headaches.

I filed this issue: https://github.com/NixOS/nixpkgs/issues/138332 which was solved by this PR: https://github.com/NixOS/nixpkgs/pull/138345

The gist is:

Fortunately someone identified the issue, prompting discussion. Now that we've patched over the issue, removing the massive rebuilds, its time to discuss removing this anti-feature.

  1. It splits the cache. It just happens that, with this last incident patched, we happen to hit the "split" that accommodates most of our desktop users.

  2. My understanding is that nixpkgs.config was meant to configure attributes of the nixpkgs set, rather than basically acting as global MAKEFLAGS.

  3. Users that really need to avoid PulseAudio are already free to do so by overriding these packages with withPulseAudio = false.

  4. It just feels like it's time to build things with Pulse support by default, especially since this flag starts to stick out even more like a sore thumb as some applications consider/adopt PipeWire.

I'm not necessarily volunteering to implement this, I'm not sure how large of an undertaking it would be, but I wanted this to be tracked.

eadwu commented 3 years ago

I think the point of having this was because some people didn't want any semblance of pulseaudio on their system. Overriding every one of those packages is a lot more work and breaks behaviors from the past.

erincandescent commented 3 years ago

Is there a way we could just make nixpkgs.config.pulseaudio default to true if isLinux and nuke the adhoc logic from all of the consumers of it?

It seems like a broadly useful setting and it's probably silly to have individual packages making decisions on defaults

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info

Artturin commented 1 year ago

Is there a way we could just make nixpkgs.config.pulseaudio default to true if isLinux and nuke the adhoc logic from all of the consumers of it?

yes by adding it to https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/config.nix and removing or ... from the uses of it (assuming stdenv.isLinux can be used in config.nix) EDIT: its not possible due to infinite recursion

i would prefer removing the option completely and building with pulseaudio by default due to the reasons listed in the OP

colemickens commented 10 months ago

@K900 I know you were doing some clean up of nixpkgs.config. Do we still use it as an awkward internal feature flag? I'm trying to figure out if this (and another related issue where webkit-gtk was cache-missing if this was set) are old and can be closed.

K900 commented 10 months ago

We do, but we'd rather not, if that makes any sense?

colemickens commented 10 months ago

I understand, anyway. I'll leave this open and try to take a look again soon at what the state is. Thanks for the fast reply.