nixpkgs/pkgs/development/libraries/pipewire/test-paths.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
583 B
Nix
Raw Normal View History

2021-10-25 15:45:52 +02:00
{ lib, runCommand, package, paths-out, paths-lib }:
2020-10-23 22:09:18 +02:00
let
check-path = output: path: ''
if [[ ! -f "${output}/${path}" && ! -d "${output}/${path}" ]]; then
printf "Missing: %s\n" "${output}/${path}" | tee -a $out
error=error
2020-10-23 22:09:18 +02:00
else
printf "Found: %s\n" "${output}/${path}" | tee -a $out
fi
2020-10-23 22:09:18 +02:00
'';
2020-10-23 22:09:18 +02:00
check-output = output: lib.concatMapStringsSep "\n" (check-path output);
in runCommand "pipewire-test-paths" { } ''
touch $out
2020-10-23 22:09:18 +02:00
2021-10-25 15:45:52 +02:00
${check-output package.lib paths-lib}
${check-output package paths-out}
2020-10-23 22:09:18 +02:00
if [[ -n "$error" ]]; then
exit 1
fi
''