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

This commit is contained in:
Andreas Rammhold 2020-02-06 00:59:40 +01:00
parent f498ceb6f2
commit 56e11bc8df
No known key found for this signature in database
GPG key ID: E432E410B5E48C86

View file

@ -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