From cc1caa87fbbc11338a650623c7776bf57402cd16 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 25 Oct 2021 17:19:24 +0200 Subject: Use Rust binaries from Nix instead of rustup --- default.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 940f3823..d44d5741 100644 --- a/default.nix +++ b/default.nix @@ -11,26 +11,17 @@ with import ./nix/common.nix; let crossSystem = { config = target; }; in let - pkgs = import pkgsSrc { inherit system crossSystem; - overlays = [ cargo2nixOverlay rustOverlay ]; + overlays = [ cargo2nixOverlay ]; }; - rustDist = pkgs.buildPackages.rust-bin.stable.latest.default; /* The following complexity should be abstracted by makePackageSet' (note the final quote). However its code uses deprecated features of rust-overlay that can lead to bug. Instead, we build our own rustChannel object with the recommended API of rust-overlay. */ - rustChannel = rustDist // { - cargo = rustDist; - rustc = rustDist.override { - targets = [ - (pkgs.rustBuilder.rustLib.realHostTriple pkgs.stdenv.targetPlatform) - ]; - }; - }; + rustChannel = pkgs.rustPlatform.rust; overrides = pkgs.buildPackages.rustBuilder.overrides.all ++ [ (pkgs.rustBuilder.rustLib.makeOverride { -- cgit v1.2.3