Target stable toolchain

This commit is contained in:
Zhaofeng Li 2021-02-10 00:39:25 -08:00
parent 9a588815c8
commit 9f4d5a2221
8 changed files with 11 additions and 45 deletions

View file

@ -1,11 +1,8 @@
{
pkgs ? import ./pkgs.nix {},
pkgs ? import ./pkgs.nix,
}: let
lib = pkgs.lib;
rustPlatform = if pkgs ? pinnedRust then pkgs.makeRustPlatform {
rustc = pkgs.pinnedRust;
cargo = pkgs.pinnedRust;
} else pkgs.rustPlatform;
rustPlatform = pkgs.rustPlatform;
in rustPlatform.buildRustPackage {
name = "colmena-dev";
version = "0.1.0";

View file

@ -1,7 +1,7 @@
let
pkgs = import ./pkgs.nix {};
pkgs = import ./pkgs.nix;
in pkgs.mkShell {
buildInputs = with pkgs; [
pinnedRust
rustc cargo
];
}

View file

@ -22,17 +22,5 @@
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/b94726217f7cdc02ddf277b65553762d520da196.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-mozilla": {
"branch": "master",
"description": "mozilla related nixpkgs (extends nixos/nixpkgs repo)",
"homepage": null,
"owner": "mozilla",
"repo": "nixpkgs-mozilla",
"rev": "8c007b60731c07dd7a052cce508de3bb1ae849b4",
"sha256": "1zybp62zz0h077zm2zmqs2wcg3whg6jqaah9hcl1gv4x8af4zhs6",
"type": "tarball",
"url": "https://github.com/mozilla/nixpkgs-mozilla/archive/8c007b60731c07dd7a052cce508de3bb1ae849b4.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

View file

@ -1,20 +1,3 @@
{
sources ? import ./nix/sources.nix,
rustNightly ? "2020-11-10",
}: let
pkgs = import sources.nixpkgs {
overlays = [
(import sources.nixpkgs-mozilla)
(self: super: let
rustChannel = super.rustChannelOf {
channel = "nightly";
date = rustNightly;
};
in rec {
pinnedRust = rustChannel.rust.override {
extensions = [ "rust-src" ];
};
})
];
};
in pkgs
let
sources = import ./nix/sources.nix;
in import sources.nixpkgs {}

View file

@ -1,5 +1,5 @@
let
pkgs = import ./pkgs.nix {};
pkgs = import ./pkgs.nix;
in pkgs.mkShell {
buildInputs = [
(import ./default.nix {})

View file

@ -131,7 +131,7 @@ pub async fn run(_global_args: &ArgMatches<'_>, local_args: &ArgMatches<'_>) {
let progress = Arc::new(progress);
let command: Arc<Vec<String>> = Arc::new(local_args.values_of("command").unwrap().map(|s| s.to_string()).collect());
progress.run(async move |progress| {
progress.run(|progress| async move {
let mut futures = Vec::new();
for (name, host) in hosts.drain() {

View file

@ -1,5 +1,3 @@
#![feature(async_closure)]
use std::env;
use clap::{App, AppSettings, Arg};

View file

@ -261,7 +261,7 @@ impl Deployment {
{
let arc_self = self.clone();
progress.run(async move |progress| {
progress.run(|progress| async move {
let mut futures = Vec::new();
for node in self.target_names.iter() {
@ -324,7 +324,7 @@ impl Deployment {
let arc_self = self.clone();
let eval_limit = arc_self.clone().eval_limit();
progress.run(async move |progress| {
progress.run(|progress| async move {
let mut futures = Vec::new();
for chunk in self.target_names.chunks(eval_limit) {