anchor.diff:      done
   
       for PlexLibrary in "''${PlexLibraryList[@]}" ; do
  -      patchelf \
  -        --set-rpath "$libraryPath:$out/lib/plexmediaserver" \
  -        "$out/lib/plexmediaserver/$PlexLibrary"
  +      if [ -n "$PlexLibrary" ] ; then
  +        patchelf \
  +          --set-rpath "$libraryPath:$out/lib/plexmediaserver" \
  +          "$out/lib/plexmediaserver/$(basename "$PlexLibrary")"
  +      fi
       done
     '' + ''
       for PlexExecutable in "''${PlexExecutableList[@]}" ; do
  
positive.code:     local TestLib
      for TestLib in "''${PlexLibraryList[@]}" ; do
        echo "Testing rpath for: $TestLib"
        if [ -n "$(ldd "$out/lib/plexmediaserver/$TestLib" 2> /dev/null |
                   grep --only-matching 'not found')" ] ; then
          echo "ERROR: failed to patch RPATH's for:"
          echo "$TestLib"
          ldd "$out/lib/plexmediaserver/$TestLib"
          return 1
        fi
        echo "PASSED"
  
negative.code:       ['Plex Transcoder']='plex-transcoder'
      )
  
      mapfile -t PlexLibraryList < <(
        find 'usr/lib/plexmediaserver' -maxdepth 1 -name '*.so*'
      )
      for PlexLibrary in "''${PlexLibraryList[@]}" ; do
        PlexLibraryBase="$(basename "$PlexLibrary")"
        mapfile -d: -t InputLibraryList < <(echo ${libraryPath})
        for InputLibrary in "''${InputLibraryList[@]}" ; do
          if [ -f "$InputLibrary/$PlexLibraryBase" ] ; then
            PlexLibraryList=("''${PlexLibraryList[@]//$PlexLibrary}")
          fi
        done
      done
    '';
  
    buildPhase = ":";
  