nix/rust-platform: remove rustcSrc which had to be kept in sync
This commit is contained in:
parent
4c79c797d5
commit
b4d91e7904
@ -15,7 +15,7 @@ let
|
||||
|
||||
nativeBuildInputs = [ cargo-xbuild ];
|
||||
buildPhase = ''
|
||||
export XARGO_RUST_SRC="${rustPlatform.rust.rustc.src}/library"
|
||||
export XARGO_RUST_SRC="${rustPlatform.rust.rustc}/lib/rustlib/src/rust/library"
|
||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
||||
pushd ${crate}
|
||||
cargo xbuild --release --frozen \
|
||||
|
@ -1,24 +1,20 @@
|
||||
{ pkgs }:
|
||||
|
||||
let
|
||||
rustcSrc = pkgs.fetchgit {
|
||||
url = "https://github.com/rust-lang/rust.git";
|
||||
# sync with git_commit_hash from pkg.rust in channel-rust-nightly.toml
|
||||
rev = "8dae8cdcc8fa879cea6a4bbbfa5b32e97be4c306";
|
||||
sha256 = "1c9wdwqvskchiqkxqnl516z2yajs2nbs31y4j6m2jz945dj8x4xc";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
rustManifest = ./channel-rust-nightly.toml;
|
||||
|
||||
targets = [];
|
||||
rustChannelOfTargets = _channel: _date: targets:
|
||||
(pkgs.lib.rustLib.fromManifestFile rustManifest {
|
||||
inherit (pkgs) stdenv fetchurl patchelf;
|
||||
}).rust.override { inherit targets; };
|
||||
}).rust.override {
|
||||
inherit targets;
|
||||
extensions = ["rust-src"];
|
||||
};
|
||||
rust =
|
||||
rustChannelOfTargets "nightly" null targets;
|
||||
in
|
||||
pkgs.recurseIntoAttrs (pkgs.makeRustPlatform {
|
||||
rustc = rust // { src = rustcSrc; };
|
||||
rustc = rust;
|
||||
cargo = rust;
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user