forked from mirrors/nixpkgs
pulseaudio: split the "dev" output
This is meant mainly for the `libpulseaudio` attribute.
This commit is contained in:
parent
e0ed398346
commit
8db97583ae
|
@ -26,7 +26,7 @@ let
|
||||||
# are built with PulseAudio support (like KDE).
|
# are built with PulseAudio support (like KDE).
|
||||||
clientConf = writeText "client.conf" ''
|
clientConf = writeText "client.conf" ''
|
||||||
autospawn=${if nonSystemWide then "yes" else "no"}
|
autospawn=${if nonSystemWide then "yes" else "no"}
|
||||||
${optionalString nonSystemWide "daemon-binary=${cfg.package}/bin/pulseaudio"}
|
${optionalString nonSystemWide "daemon-binary=${cfg.package.out}/bin/pulseaudio"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Write an /etc/asound.conf that causes all ALSA applications to
|
# Write an /etc/asound.conf that causes all ALSA applications to
|
||||||
|
@ -129,11 +129,11 @@ in {
|
||||||
source = clientConf;
|
source = clientConf;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.pulseaudio.configFile = mkDefault "${cfg.package}/etc/pulse/default.pa";
|
hardware.pulseaudio.configFile = mkDefault "${cfg.package.out}/etc/pulse/default.pa";
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf cfg.enable {
|
(mkIf cfg.enable {
|
||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [ cfg.package.out ];
|
||||||
|
|
||||||
environment.etc = singleton {
|
environment.etc = singleton {
|
||||||
target = "asound.conf";
|
target = "asound.conf";
|
||||||
|
@ -170,7 +170,7 @@ in {
|
||||||
before = [ "sound.target" ];
|
before = [ "sound.target" ];
|
||||||
environment.PULSE_RUNTIME_PATH = stateDir;
|
environment.PULSE_RUNTIME_PATH = stateDir;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package}/bin/pulseaudio -D --log-level=${cfg.daemon.logLevel} --system --use-pid-file -n --file=${cfg.configFile}";
|
ExecStart = "${cfg.package.out}/bin/pulseaudio -D --log-level=${cfg.daemon.logLevel} --system --use-pid-file -n --file=${cfg.configFile}";
|
||||||
PIDFile = "${stateDir}/pid";
|
PIDFile = "${stateDir}/pid";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -85,14 +85,14 @@ let
|
||||||
# Start PulseAudio if enabled.
|
# Start PulseAudio if enabled.
|
||||||
${optionalString (config.hardware.pulseaudio.enable) ''
|
${optionalString (config.hardware.pulseaudio.enable) ''
|
||||||
${optionalString (!config.hardware.pulseaudio.systemWide)
|
${optionalString (!config.hardware.pulseaudio.systemWide)
|
||||||
"${config.hardware.pulseaudio.package}/bin/pulseaudio --start"
|
"${config.hardware.pulseaudio.package.out}/bin/pulseaudio --start"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Publish access credentials in the root window.
|
# Publish access credentials in the root window.
|
||||||
${config.hardware.pulseaudio.package}/bin/pactl load-module module-x11-publish "display=$DISPLAY"
|
${config.hardware.pulseaudio.package.out}/bin/pactl load-module module-x11-publish "display=$DISPLAY"
|
||||||
|
|
||||||
# Keep track of devices. Mostly useful for Phonon/KDE.
|
# Keep track of devices. Mostly useful for Phonon/KDE.
|
||||||
${config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
|
${config.hardware.pulseaudio.package.out}/bin/pactl load-module module-device-manager "do_routing=1"
|
||||||
''}
|
''}
|
||||||
|
|
||||||
# Tell systemd about our $DISPLAY. This is needed by the
|
# Tell systemd about our $DISPLAY. This is needed by the
|
||||||
|
|
|
@ -43,6 +43,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
patches = [ ./caps-fix.patch ];
|
patches = [ ./caps-fix.patch ];
|
||||||
|
|
||||||
|
outputs = [ "dev" "out" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig intltool autoreconfHook ];
|
nativeBuildInputs = [ pkgconfig intltool autoreconfHook ];
|
||||||
|
|
||||||
propagatedBuildInputs =
|
propagatedBuildInputs =
|
||||||
|
@ -111,8 +113,8 @@ stdenv.mkDerivation rec {
|
||||||
postInstall = lib.optionalString libOnly ''
|
postInstall = lib.optionalString libOnly ''
|
||||||
rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}}
|
rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}}
|
||||||
sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $out/lib/libpulsecore-${version}.la
|
sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $out/lib/libpulsecore-${version}.la
|
||||||
_moveToOutput lib/cmake "$dev"
|
''
|
||||||
'';
|
+ ''_moveToOutput lib/cmake "$dev" '';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Sound server for POSIX and Win32 systems";
|
description = "Sound server for POSIX and Win32 systems";
|
||||||
|
|
|
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||||
for i in $out/bin/* $out/libexec/*; do
|
for i in $out/bin/* $out/libexec/*; do
|
||||||
wrapProgram $i \
|
wrapProgram $i \
|
||||||
--set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH" \
|
--set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH" \
|
||||||
--set LD_LIBRARY_PATH "${libpulseaudio}/lib:" \
|
--set LD_LIBRARY_PATH "${libpulseaudio.out}/lib:" \
|
||||||
--prefix PATH : ${xdg_utils}/bin
|
--prefix PATH : ${xdg_utils}/bin
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue