anchor.diff:    postFixup = /* Run some tests */ ''
       # Fail if libraries contain broken RPATH's
       local TestLib
  -    for TestLib in "''${PlexLibraryList[@]}" ; do
  +    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
  +                 grep --only-matching 'not found')" ]; then
           echo "ERROR: failed to patch RPATH's for:"
           echo "$(basename "$TestLib")"
           ldd "$out/lib/plexmediaserver/$(basename "$TestLib")"
  
positive.code:         "$out/bin/''${PlexExecutableList["$PlexExecutable"]}"
      done
  
      for PlexLibrary in "''${PlexLibraryList[@]}" ; do
        if [ -n "$PlexLibrary" ] ; then
          install -D -m 644 -v "$PlexLibrary" \
            "$out/lib/plexmediaserver/$(basename "$PlexLibrary")"
        fi
      done
  
      install -D -m 644 -v 'usr/lib/plexmediaserver/plex-archive-keyring.gpg' \
        "$out/lib/plexmediaserver/plex-archive-keyring.gpg"
  
      cp -dr --no-preserve='ownership' 'usr/lib/plexmediaserver/Resources' \
        "$out/lib/plexmediaserver"
    '';
  
    preFixup = ''
      for PlexExecutable in "''${!PlexExecutableList[@]}" ; do
        patchelf \
          --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
          "$out/lib/plexmediaserver/$PlexExecutable"
  
negative.code: 
      # Fail if executables contain broken RPATH's
      local executable
      for executable in "''${!PlexExecutableList[@]}"; do
        echo "Testing rpath for: $executable"
        if [ -n "$(ldd "$out/lib/plexmediaserver/$executable" 2> /dev/null |
                   grep --only-matching 'not found')" ]; then
          echo "ERROR: failed to patch RPATH's for:"
          echo "$executable"
          ldd "$out/lib/plexmediaserver/$executable"
  