rustc: avoid corrupting or1k crates

stm32-no-overlay
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 ? [] , targetToolchains ? []
, targetPatches ? [] , targetPatches ? []
, fetchFromGitHub , fetchFromGitHub
, runCommand
}: }:
let let
@ -61,20 +62,9 @@ let
''; '';
}; };
in in
stdenv.mkDerivation { runCommand "rustc" {}
name = "rustc"; ''
src = ./.; mkdir -p $out/lib/rustlib/or1k-unknown-none/lib/
installPhase = '' cp -r ${or1k-crates}/* $out/lib/rustlib/or1k-unknown-none/lib/
mkdir $out cp -r ${rustc_internal}/* $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;
};
}