buildRustCrate: remap the current build dir to / for (more) reproducible builds

This commit is contained in:
Andreas Rammhold
2020-02-06 01:18:59 +01:00
parent f498ceb6f2
commit 56e11bc8df
@@ -11,6 +11,7 @@
baseRustcOpts =
[(if release then "-C opt-level=3" else "-C debuginfo=2")]
++ ["-C codegen-units=$NIX_BUILD_CORES"]
++ ["--remap-path-prefix=$NIX_BUILD_TOP=/" ]
++ [(mkRustcDepArgs dependencies crateRenames)]
++ [crateFeatures]
++ extraRustcOpts