rustPlatform.rustVendorSrc: init
This is needed when compiling against rustLibSrc, for example when using wasm-pack. The upstream Cargo.lock may not include those dependencies.
This commit is contained in:
@@ -51,6 +51,12 @@
|
||||
inherit runCommand rustc;
|
||||
};
|
||||
|
||||
# Useful when rebuilding std
|
||||
# e.g. when building wasm with wasm-pack
|
||||
rustVendorSrc = callPackage ./rust-vendor-src.nix {
|
||||
inherit runCommand rustc;
|
||||
};
|
||||
|
||||
# Hooks
|
||||
inherit
|
||||
(callPackages ../../../build-support/rust/hooks {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{ runCommand, rustc }:
|
||||
|
||||
runCommand "rust-vendor-src" { } ''
|
||||
tar --strip-components=1 -xzf ${rustc.src}
|
||||
mv vendor $out
|
||||
''
|
||||
Reference in New Issue
Block a user