mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 20:39:04 +02:00
pipewire: cleanup path testing
This commit is contained in:
parent
9397d535bd
commit
57510bf522
|
@ -100,6 +100,6 @@ in {
|
|||
source = "${pkgs.pipewire}/share/alsa/alsa.conf.d/50-pipewire.conf";
|
||||
};
|
||||
environment.sessionVariables.LD_LIBRARY_PATH =
|
||||
lib.optional (cfg.alsa.enable || cfg.jack.enable || cfg.pulse.enable) "/run/current-system/sw/lib/pipewire";
|
||||
lib.optional (cfg.jack.enable || cfg.pulse.enable) "/run/current-system/sw/lib/pipewire";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
{ lib, runCommand, pipewire, paths-out, paths-lib }:
|
||||
|
||||
runCommand "pipewire-test-paths" { } ''
|
||||
${lib.concatMapStringsSep "\n" (p: ''
|
||||
if [ ! -f "${pipewire.lib}/${p}" ] && [ ! -d "${pipewire.lib}/${p}" ]; then
|
||||
printf "pipewire failed to find the following path: %s\n" "${pipewire.lib}/${p}"
|
||||
let
|
||||
check-path = output: path: ''
|
||||
if [[ ! -f "${output}/${path}" && ! -d "${output}/${path}" ]]; then
|
||||
printf "Missing: %s\n" "${output}/${path}" | tee -a $out
|
||||
error=error
|
||||
else
|
||||
printf "Found: %s\n" "${output}/${path}" | tee -a $out
|
||||
fi
|
||||
'') paths-lib}
|
||||
'';
|
||||
|
||||
${lib.concatMapStringsSep "\n" (p: ''
|
||||
if [ ! -f "${pipewire}/${p}" ] && [ ! -d "${pipewire}/${p}" ]; then
|
||||
printf "pipewire failed to find the following path: %s\n" "${pipewire}/${p}"
|
||||
error=error
|
||||
fi
|
||||
'') paths-out}
|
||||
|
||||
[ -n "$error" ] && exit 1
|
||||
check-output = output: lib.concatMapStringsSep "\n" (check-path output);
|
||||
in runCommand "pipewire-test-paths" { } ''
|
||||
touch $out
|
||||
|
||||
${check-output pipewire.lib paths-lib}
|
||||
${check-output pipewire paths-out}
|
||||
|
||||
if [[ -n "$error" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue