parameterize rustcSrc
This commit is contained in:
parent
a153be896f
commit
d906fda8d2
@ -8,7 +8,7 @@ let
|
||||
preferLocalBuild = true;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
RUSTC_SRC=${rustPlatform.rustcSrc} ORIG_CARGO=${originalCargoToml} \
|
||||
RUSTC_SRC=${rustPlatform.rustcSrc.override { minimalContent = false; }} ORIG_CARGO=${originalCargoToml} \
|
||||
${buildPackages.python3.withPackages (ps: with ps; [ toml ])}/bin/python3 ${./cargo.py}
|
||||
mkdir -p $out
|
||||
cp Cargo.toml $out/Cargo.toml
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, rustc }:
|
||||
{ lib, stdenv, rustc, minimalContent ? true }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "rust-src";
|
||||
@ -6,6 +6,9 @@ stdenv.mkDerivation {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
installPhase = ''
|
||||
mv src $out
|
||||
rm -rf $out/{ci,doc,etc,grammar,llvm-project,llvm-emscripten,rtstartup,rustllvm,test,vendor}
|
||||
rm -rf $out/{${if minimalContent
|
||||
then "ci,doc,etc,grammar,llvm-project,llvm-emscripten,rtstartup,rustllvm,test,tools,vendor,stdarch"
|
||||
else "ci,doc,etc,grammar,llvm-project,llvm-emscripten,rtstartup,rustllvm,test,vendor"
|
||||
}}
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user