2020-08-05 19:48:37 +01:00
|
|
|
{ lib, runCommand, pipewire, paths-out, paths-lib }:
|
|
|
|
|
2020-10-23 21:09:18 +01:00
|
|
|
let
|
|
|
|
check-path = output: path: ''
|
|
|
|
if [[ ! -f "${output}/${path}" && ! -d "${output}/${path}" ]]; then
|
|
|
|
printf "Missing: %s\n" "${output}/${path}" | tee -a $out
|
2020-08-05 19:48:37 +01:00
|
|
|
error=error
|
2020-10-23 21:09:18 +01:00
|
|
|
else
|
|
|
|
printf "Found: %s\n" "${output}/${path}" | tee -a $out
|
2020-08-05 19:48:37 +01:00
|
|
|
fi
|
2020-10-23 21:09:18 +01:00
|
|
|
'';
|
2020-08-05 19:48:37 +01:00
|
|
|
|
2020-10-23 21:09:18 +01:00
|
|
|
check-output = output: lib.concatMapStringsSep "\n" (check-path output);
|
|
|
|
in runCommand "pipewire-test-paths" { } ''
|
2020-08-05 19:48:37 +01:00
|
|
|
touch $out
|
2020-10-23 21:09:18 +01:00
|
|
|
|
2021-02-25 14:22:40 +00:00
|
|
|
${check-output pipewire.mediaSession paths-out-media-session}
|
2020-10-23 21:09:18 +01:00
|
|
|
${check-output pipewire.lib paths-lib}
|
|
|
|
${check-output pipewire paths-out}
|
|
|
|
|
|
|
|
if [[ -n "$error" ]]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-08-05 19:48:37 +01:00
|
|
|
''
|