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.

aleksana 453d6b71 0cbc19a0

Changed files
+12
pkgs
development
+6
pkgs/development/compilers/rust/make-rust-platform.nix
···
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 {
+6
pkgs/development/compilers/rust/rust-vendor-src.nix
···
+
{ runCommand, rustc }:
+
+
runCommand "rust-vendor-src" { } ''
+
tar --strip-components=1 -xzf ${rustc.src}
+
mv vendor $out
+
''