pulseaudio: split the "dev" output

This is meant mainly for the `libpulseaudio` attribute.
This commit is contained in:
Vladimír Čunát 2015-10-08 11:51:10 +02:00
parent e0ed398346
commit 8db97583ae
4 changed files with 12 additions and 10 deletions

View File

@ -26,7 +26,7 @@ let
# are built with PulseAudio support (like KDE).
clientConf = writeText "client.conf" ''
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
@ -129,11 +129,11 @@ in {
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 {
environment.systemPackages = [ cfg.package ];
environment.systemPackages = [ cfg.package.out ];
environment.etc = singleton {
target = "asound.conf";
@ -170,7 +170,7 @@ in {
before = [ "sound.target" ];
environment.PULSE_RUNTIME_PATH = stateDir;
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";
};
};

View File

@ -85,14 +85,14 @@ let
# Start PulseAudio if enabled.
${optionalString (config.hardware.pulseaudio.enable) ''
${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.
${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.
${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

View File

@ -43,6 +43,8 @@ stdenv.mkDerivation rec {
patches = [ ./caps-fix.patch ];
outputs = [ "dev" "out" ];
nativeBuildInputs = [ pkgconfig intltool autoreconfHook ];
propagatedBuildInputs =
@ -111,8 +113,8 @@ stdenv.mkDerivation rec {
postInstall = lib.optionalString libOnly ''
rm -rf $out/{bin,share,etc,lib/{pulse-*,systemd}}
sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $out/lib/libpulsecore-${version}.la
_moveToOutput lib/cmake "$dev"
'';
''
+ ''_moveToOutput lib/cmake "$dev" '';
meta = {
description = "Sound server for POSIX and Win32 systems";

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
for i in $out/bin/* $out/libexec/*; do
wrapProgram $i \
--set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH" \
--set LD_LIBRARY_PATH "${libpulseaudio}/lib:" \
--set LD_LIBRARY_PATH "${libpulseaudio.out}/lib:" \
--prefix PATH : ${xdg_utils}/bin
done