1
0
Fork 0

rustc: avoid corrupting or1k crates

This commit is contained in:
Sebastien Bourdeauducq 2019-04-13 18:25:18 +08:00
parent 8868145a8b
commit e20918e5cb
1 changed files with 7 additions and 17 deletions

View File

@ -3,6 +3,7 @@
, targetToolchains ? []
, targetPatches ? []
, fetchFromGitHub
, runCommand
}:
let
@ -61,20 +62,9 @@ let
'';
};
in
stdenv.mkDerivation {
name = "rustc";
src = ./.;
installPhase = ''
mkdir $out
mkdir -p $out/lib/rustlib/or1k-unknown-none/lib/
cp -r ${or1k-crates}/* $out/lib/rustlib/or1k-unknown-none/lib/
cp -r ${rustc_internal}/* $out
'';
meta = with stdenv.lib; {
homepage = https://www.rust-lang.org/;
description = "A safe, concurrent, practical language";
maintainers = with maintainers; [ sb0 ];
license = [ licenses.mit licenses.asl20 ];
platforms = platforms.linux ++ platforms.darwin;
};
}
runCommand "rustc" {}
''
mkdir -p $out/lib/rustlib/or1k-unknown-none/lib/
cp -r ${or1k-crates}/* $out/lib/rustlib/or1k-unknown-none/lib/
cp -r ${rustc_internal}/* $out
''