2020-06-12 08:41:24 +02:00
|
|
|
{ config, ... }:
|
2019-10-23 03:44:17 +02:00
|
|
|
|
|
|
|
let
|
2020-06-12 08:41:24 +02:00
|
|
|
mozRust = with builtins; (map (p: import ((fetchTarball {
|
|
|
|
url = "https://github.com/mozilla/nixpkgs-mozilla/archive/e912ed4.tar.gz";
|
|
|
|
sha256 = "08fvzb8w80bkkabc1iyhzd15f4sm7ra10jn32kfch5klgl0gj3j3";
|
|
|
|
}) + p))) [
|
|
|
|
(toPath "/lib-overlay.nix")
|
|
|
|
(toPath "/rust-overlay.nix")
|
|
|
|
];
|
|
|
|
stablepkgs = import <nixos-stable> { overlays = mozRust;};
|
|
|
|
|
|
|
|
# https://rust-lang.github.io/rustup-components-history
|
|
|
|
nightly = stablepkgs.rustChannelOf {
|
|
|
|
date = "2020-06-10";
|
|
|
|
channel = "nightly";
|
|
|
|
};
|
|
|
|
rustNightly = {
|
|
|
|
rustc = nightly.rust.override {
|
|
|
|
extensions = [
|
|
|
|
"clippy-preview"
|
|
|
|
"rls-preview"
|
|
|
|
"rust-analysis"
|
|
|
|
"rust-src"
|
|
|
|
"rustfmt-preview"
|
|
|
|
]; } // { src = nightly.rust-src; };
|
|
|
|
cargo = nightly.cargo;
|
|
|
|
};
|
|
|
|
rustPNightly = stablepkgs.recurseIntoAttrs (stablepkgs.makeRustPlatform {
|
|
|
|
inherit (rustNightly) rustc cargo;
|
|
|
|
});
|
|
|
|
|
2019-10-23 03:44:17 +02:00
|
|
|
in {
|
2020-06-12 08:41:24 +02:00
|
|
|
config.machine.pkgsets.rustpkgs.pkgs = (with stablepkgs; [
|
2020-03-23 10:10:31 +01:00
|
|
|
diesel-cli
|
2019-10-23 03:44:17 +02:00
|
|
|
carnix
|
|
|
|
rustracer
|
2020-06-12 08:41:24 +02:00
|
|
|
]) ++ (with rustNightly; [ rustc cargo]);
|
2019-10-23 03:44:17 +02:00
|
|
|
}
|