nixpkgs/pkgs/servers/pulseaudio
Yarny0 3871f8be8d pulseaudioFull: fix wrapGApp wrapping
Since

7a2605e0f3

the pulseaudio build recipe incorporates the `wrapGAppsHook`
wrapper setup-hook if `advancedBluetoothCodecs` are enabled.
This wrapper setup-hook -- like most wrappers --
wraps binaries in `$out/bin` by first renaming them,
then placing a wrapper script where the original binary was.

Unfortunatelly, pulseaudio doesn't like its
binary moved around after installation:
It records the binaries path during installation time

e5ad31e873/meson.build (L154)

then checks the path in `/proc/self/exe` and complains

> Jun 16 19:06:48 nixosb pulseaudio[2219]: W: [.pulseaudio-wra] main.c: /proc/self/exe does not point to /nix/store/bqfyzxwpxa2ydmyvh3j32xrm4chxbj22-pulseaudio-15.0/bin/pulseaudio, cannot self execute. Are you playing games?

if they don't match

e5ad31e873/src/daemon/main.c (L577)

Somehow, this also results in a real bug:
`pacmd` fails to connect to the pulseaudio server, see

https://github.com/NixOS/nixpkgs/issues/177915

To fix this issue, the commit at hand changes the
installation directory for binaries to `$out/.bin-unwrapped`.
After the installation, `$out/bin` is created by hand and
populated with symlinks to files in `$out/.bin-unwrapped`.
`wrapGAppsHook` doesn't know or care about the `.bin-unwrapped`
directory; it just sees all the symlinks in `bin`,
renames them and places wrapper scripts beside them.

Effectively, this leaves the original
binary in `.bin-unwrapped` unchanged!
So pulseaudio will find itself still in its oritinal place,
and "users" of the package can call pulseaudio
via the wrapper script in `bin` as usual.
2022-08-18 16:51:18 +02:00
..
0001-Make-gio-2.0-optional-15.patch pulseaudio: add darwin support 2022-08-02 18:39:28 +02:00
0001-Make-gio-2.0-optional-16.patch pulseaudio: add darwin support 2022-08-02 18:39:28 +02:00
0002-Ignore-SCM_CREDS-on-darwin.patch pulseaudio: add darwin support 2022-08-02 18:39:28 +02:00
0003-Ignore-HAVE_CPUID_H-on-aarch64-darwin.patch pulseaudio: add darwin support 2022-08-02 18:39:28 +02:00
0004-Prefer-HAVE_CLOCK_GETTIME-on-darwin.patch pulseaudio: add darwin support 2022-08-02 18:39:28 +02:00
0005-Enable-CoreAudio-on-darwin.patch pulseaudio: add darwin support 2022-08-02 18:39:28 +02:00
0006-Fix-libpulsecommon-sources-on-darwin.patch pulseaudio: add darwin support 2022-08-02 18:39:28 +02:00
0007-Fix-link-args-on-darwin.patch pulseaudio: add darwin support 2022-08-02 18:39:28 +02:00
add-option-for-installation-sysconfdir.patch pulseaudio: 14.2 -> 15.0, switch to meson, enable tests 2022-04-02 22:15:45 +02:00
default.nix pulseaudioFull: fix wrapGApp wrapping 2022-08-18 16:51:18 +02:00
hsphfpd.nix treewide: with stdenv.lib; in meta -> with lib; 2021-01-11 10:38:22 +01:00
qpaeq.nix treewide: switch all desktop file generators to new API 2022-02-25 13:40:38 -08:00