diff options
author | Nathaniel Glen <njag2202@gmail.com> | 2020-10-23 16:09:18 -0400 |
---|---|---|
committer | Nathaniel Glen <njag2202@gmail.com> | 2020-10-23 16:35:48 -0400 |
commit | 57510bf522c90c63fec9b086a42b661ffdaf43c7 (patch) | |
tree | 75c1f869acff7b98b9be82ee3ada9212e42d24cb /pkgs/development/libraries/pipewire | |
parent | 9397d535bddf4bd296f5d155edf7461d6c379e87 (diff) | |
download | nixpkgs-57510bf522c90c63fec9b086a42b661ffdaf43c7.tar nixpkgs-57510bf522c90c63fec9b086a42b661ffdaf43c7.tar.gz nixpkgs-57510bf522c90c63fec9b086a42b661ffdaf43c7.tar.bz2 nixpkgs-57510bf522c90c63fec9b086a42b661ffdaf43c7.tar.lz nixpkgs-57510bf522c90c63fec9b086a42b661ffdaf43c7.tar.xz nixpkgs-57510bf522c90c63fec9b086a42b661ffdaf43c7.tar.zst nixpkgs-57510bf522c90c63fec9b086a42b661ffdaf43c7.zip |
pipewire: cleanup path testing
Diffstat (limited to 'pkgs/development/libraries/pipewire')
-rw-r--r-- | pkgs/development/libraries/pipewire/test-paths.nix | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/pkgs/development/libraries/pipewire/test-paths.nix b/pkgs/development/libraries/pipewire/test-paths.nix index 98fbd516a19..0ae69374194 100644 --- a/pkgs/development/libraries/pipewire/test-paths.nix +++ b/pkgs/development/libraries/pipewire/test-paths.nix @@ -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 '' |