From e20918e5cb6b7d4272731f42758b6f03595fdb6b Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 13 Apr 2019 18:25:18 +0800 Subject: [PATCH] rustc: avoid corrupting or1k crates --- artiq/pkgs/rust/default.nix | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/artiq/pkgs/rust/default.nix b/artiq/pkgs/rust/default.nix index 6c9e80d..6a4066e 100644 --- a/artiq/pkgs/rust/default.nix +++ b/artiq/pkgs/rust/default.nix @@ -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 + ''