diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-10-25 17:19:24 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-10-29 11:34:01 +0200 |
commit | cc1caa87fbbc11338a650623c7776bf57402cd16 (patch) | |
tree | 878cd6695e3a1c5a262a7fdeeaeef32c54c43f55 /default.nix | |
parent | 69b89fb46df3b2b0ab189218812efdcf5852f8f2 (diff) | |
download | garage-cc1caa87fbbc11338a650623c7776bf57402cd16.tar.gz garage-cc1caa87fbbc11338a650623c7776bf57402cd16.zip |
Use Rust binaries from Nix instead of rustup
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 13 |
1 files changed, 2 insertions, 11 deletions
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 { |