anchor.diff:          };
         in
         runCommand "assert-outputs-${name}" {
  -      } ''
  +      } (''
         local actualFiles=$(mktemp)
   
         cd "${crateOutput}"
  -      find . -type f | sort >$actualFiles
  -      diff -q ${expectedFilesFile} $actualFiles >/dev/null || {
  +      find . -type f \
  +        | sort \
  +      ''
  +      # sed out the hash because it differs per platform
  +      + ''
  +        | sed -E -e 's/-[0-9a-fA-F]{10}\.rlib/-HASH.rlib/g' \
  +        > "$actualFiles"
  +      diff -q ${expectedFilesFile} "$actualFiles" > /dev/null || {
           echo -e "\033[0;1;31mERROR: Difference in expected output files in ${crateOutput} \033[0m" >&2
           echo === Got:
           sed -e 's/^/  /' $actualFiles
  
positive.code:       };
        expectedFiles = [
          "./nix-support/propagated-build-inputs"
          "./lib/libtest_lib-042a1fdbef.rlib"
          "./lib/link"
        ];
      };
  
negative.code:       };
        expectedFiles = [
          "./nix-support/propagated-build-inputs"
          "./lib/libtest_lib-HASH.rlib"
          "./lib/link"
        ];
      };
  