anchor.diff:  
       # Find all shared objects in usr/lib/plexmediaserver
       mapfile -t PlexLibraryList < <(
  -      find 'usr/lib/plexmediaserver' -maxdepth 1 -name '*.so*'
  +      find 'usr/lib/plexmediaserver' -type f -name '*.so*' -printf '%P\n'
       )
       # Filter out plex libraries if they match system libraries provided
       # in `libraryPath`.
  -    for PlexLibrary in "''${PlexLibraryList[@]}" ; do
  -      PlexLibraryBase="$(basename "$PlexLibrary")"
  +    for PlexLibrary in "''${PlexLibraryList[@]}"; do
         # Read `libraryPath` string into an array
         mapfile -d: -t InputLibraryList < <(echo ${libraryPath})
  -      for InputLibrary in "''${InputLibraryList[@]}" ; do
  +      for InputLibrary in "''${InputLibraryList[@]}"; do
           # Drop matches from the array
  -        if [ -f "$InputLibrary/$PlexLibraryBase" ] ; then
  +        if [ -f "$InputLibrary/$PlexLibrary" ]; then
             PlexLibraryList=("''${PlexLibraryList[@]//$PlexLibrary}")
           fi
         done
  
positive.code:         "$out/lib/plexmediaserver/$PlexExecutable"
      done
  
      for PlexLibrary in "''${PlexLibraryList[@]}" ; do
        if [ -n "$PlexLibrary" ] ; then
          patchelf \
            --set-rpath "$libraryPath:$out/lib/plexmediaserver" \
            "$out/lib/plexmediaserver/$(basename "$PlexLibrary")"
        fi
      done
    '' + ''
      for PlexExecutable in "''${PlexExecutableList[@]}" ; do
        wrapProgram "$out/bin/$PlexExecutable" \
          --set 'PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR' \
            '"''${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR:-${dataDir}}"' \
  
negative.code:   postFixup = /* Run some tests */ ''
      # Fail if libraries contain broken RPATH's
      local TestLib
      for TestLib in "''${PlexLibraryList[@]}"; do
        echo "Testing rpath for: $TestLib"
        if [ -n "$(ldd "$out/lib/plexmediaserver/$(basename "$TestLib")" 2> /dev/null |
                   grep --only-matching 'not found')" ]; then
          echo "ERROR: failed to patch RPATH's for:"
          echo "$(basename "$TestLib")"
          ldd "$out/lib/plexmediaserver/$(basename "$TestLib")"
  