summary refs log blame commit diff
path: root/pkgs/development/libraries/pipewire/test-paths.nix
blob: 939b79686e3f37a49cb7d9e370297d43c0bc225e (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                                             
 



                                                                       
                 

                                                            
      
     
 

                                                                          
            
 
                                                               





                                        
  
{ lib, runCommand, pipewire, paths-out, paths-lib, paths-out-media-session }:

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
''