diff --git a/default.nix b/default.nix index fb97169..87d7b21 100644 --- a/default.nix +++ b/default.nix @@ -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"; diff --git a/dev-shell.nix b/dev-shell.nix index d1bd66e..2637bbb 100644 --- a/dev-shell.nix +++ b/dev-shell.nix @@ -1,7 +1,7 @@ let - pkgs = import ./pkgs.nix {}; + pkgs = import ./pkgs.nix; in pkgs.mkShell { buildInputs = with pkgs; [ - pinnedRust + rustc cargo ]; } diff --git a/nix/sources.json b/nix/sources.json index ef8887e..d930c28 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -22,17 +22,5 @@ "type": "tarball", "url": "https://github.com/NixOS/nixpkgs/archive/b94726217f7cdc02ddf277b65553762d520da196.tar.gz", "url_template": "https://github.com///archive/.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///archive/.tar.gz" } } diff --git a/pkgs.nix b/pkgs.nix index b01ded9..3d631de 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -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 {} diff --git a/shell.nix b/shell.nix index c1ce7c2..f07f30a 100644 --- a/shell.nix +++ b/shell.nix @@ -1,5 +1,5 @@ let - pkgs = import ./pkgs.nix {}; + pkgs = import ./pkgs.nix; in pkgs.mkShell { buildInputs = [ (import ./default.nix {}) diff --git a/src/command/exec.rs b/src/command/exec.rs index 4a4a2f1..69c518f 100644 --- a/src/command/exec.rs +++ b/src/command/exec.rs @@ -131,7 +131,7 @@ pub async fn run(_global_args: &ArgMatches<'_>, local_args: &ArgMatches<'_>) { let progress = Arc::new(progress); let command: Arc> = 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() { diff --git a/src/main.rs b/src/main.rs index 16783f3..102a087 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,3 @@ -#![feature(async_closure)] - use std::env; use clap::{App, AppSettings, Arg}; diff --git a/src/nix/deployment.rs b/src/nix/deployment.rs index abe4667..3f27160 100644 --- a/src/nix/deployment.rs +++ b/src/nix/deployment.rs @@ -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) {