depot/third_party/nixpkgs/pkgs/development/libraries/pipewire/test-paths.nix
Default email 75ca762b89 Project import generated by Copybara.
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
2021-03-09 11:18:52 +08:00

24 lines
650 B
Nix

{ lib, runCommand, pipewire, paths-out, paths-lib }:
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
'';
check-output = output: lib.concatMapStringsSep "\n" (check-path output);
in runCommand "pipewire-test-paths" { } ''
touch $out
${check-output pipewire.mediaSession paths-out-media-session}
${check-output pipewire.lib paths-lib}
${check-output pipewire paths-out}
if [[ -n "$error" ]]; then
exit 1
fi
''