1 { lib, stdenv, rustPlatform, buildPackages
2 , originalCargoToml ? null
7 preferLocalBuild = true;
14 export RUSTC_SRC=${rustPlatform.rustLibSrc.override { }}
16 + lib.optionalString (originalCargoToml != null) ''
17 export ORIG_CARGO=${originalCargoToml}
20 ${buildPackages.python3.withPackages (ps: with ps; [ toml ])}/bin/python3 ${./cargo.py}
22 echo '#![no_std]' > $out/src/lib.rs
23 cp Cargo.toml $out/Cargo.toml
24 cp ${./Cargo.lock} $out/Cargo.lock