Compare commits

..

No commits in common. "b4d91e7904423b6477eb1f25b8cc3940e197e9c2" and "966e43e14ed26e883a2de03d56cedde964283269" have entirely different histories.

3 changed files with 12 additions and 10 deletions

View File

@ -8,14 +8,12 @@ let
rustPlatform.buildRustPackage rec {
name = "${crate}";
src = builtins.filterSource (path: type:
baseNameOf path != "target"
) ./.;
src = ./.;
inherit cargoSha256;
nativeBuildInputs = [ cargo-xbuild ];
buildPhase = ''
export XARGO_RUST_SRC="${rustPlatform.rust.rustc}/lib/rustlib/src/rust/library"
export XARGO_RUST_SRC="${rustPlatform.rust.rustc.src}/library"
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
pushd ${crate}
cargo xbuild --release --frozen \

View File

@ -1,20 +1,24 @@
{ 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;
extensions = ["rust-src"];
};
}).rust.override { inherit targets; };
rust =
rustChannelOfTargets "nightly" null targets;
in
pkgs.recurseIntoAttrs (pkgs.makeRustPlatform {
rustc = rust;
rustc = rust // { src = rustcSrc; };
cargo = rust;
})

View File

@ -17,7 +17,7 @@ in
(import ./nix/mkbootimage.nix { inherit pkgs; })
];
XARGO_RUST_SRC = "${rustPlatform.rust.rustc}/lib/rustlib/src/rust/library";
XARGO_RUST_SRC = "${rustPlatform.rust.rustc.src}/library";
shellHook = ''
echo "Run 'cargo xbuild --release -p ...' to build."