From 851c46c312f4815857627b32a3abcebbf1fe12ff Mon Sep 17 00:00:00 2001 From: Ashutosh Varma Date: Fri, 24 Feb 2023 15:37:13 +0530 Subject: [PATCH] chore: switch to `rust-overlay` for nix rust --- third-party/nix/nixpkgs.nix | 4 ++-- third-party/nix/release.nix | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/third-party/nix/nixpkgs.nix b/third-party/nix/nixpkgs.nix index 7857bfa208..9536c7d949 100644 --- a/third-party/nix/nixpkgs.nix +++ b/third-party/nix/nixpkgs.nix @@ -1,7 +1,7 @@ -{ moz_overlay ? import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz) +{ rust-overlay ? import (builtins.fetchTarball https://github.com/oxalica/rust-overlay/archive/master.tar.gz) , nixpkgs ? import (builtins.fetchTarball https://github.com/nixos/nixpkgs-channels/archive/nixos-21.11.tar.gz) }: nixpkgs { - overlays = [ moz_overlay ]; + overlays = [ rust-overlay ]; } diff --git a/third-party/nix/release.nix b/third-party/nix/release.nix index 0628460c20..da030c9e85 100644 --- a/third-party/nix/release.nix +++ b/third-party/nix/release.nix @@ -1,13 +1,9 @@ -{ moz_overlay ? import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz) +{ rust-overlay ? import (builtins.fetchTarball https://github.com/oxalica/rust-overlay/archive/master.tar.gz) }: let - pkgs = import { overlays = [ moz_overlay ]; }; - channel = pkgs.rustChannelOf { date = "2023-01-10"; channel = "nightly"; }; + pkgs = import { overlays = [ rust-overlay ]; }; in { inherit pkgs; - rust-nightly = channel.rust.override { - targets = [ "wasm32-unknown-unknown" ]; - extensions = [ "rustfmt-preview" ]; - }; + rust-nightly = pkgs.rust-bin.fromRustupToolchainFile ../../rust-toolchain.toml; }