forked from M-Labs/nix-scripts
21 lines
615 B
Nix
21 lines
615 B
Nix
{ pkgs }:
|
|
let
|
|
rustManifest = pkgs.fetchurl {
|
|
url = "https://static.rust-lang.org/dist/2021-01-29/channel-rust-nightly.toml";
|
|
sha256 = "sha256-EZKgw89AH4vxaJpUHmIMzMW/80wAFQlfcxRoBD9nz0c=";
|
|
};
|
|
targets = [];
|
|
rustChannelOfTargets = _channel: _date: targets:
|
|
(pkgs.lib.rustLib.fromManifestFile rustManifest {
|
|
inherit (pkgs) stdenv lib fetchurl patchelf;
|
|
}).rust.override {
|
|
inherit targets;
|
|
extensions = ["rust-src"];
|
|
};
|
|
rust = rustChannelOfTargets "nightly" null targets;
|
|
in
|
|
pkgs.recurseIntoAttrs (pkgs.makeRustPlatform {
|
|
rustc = rust;
|
|
cargo = rust;
|
|
})
|