From f771dc6f6019079211b32d6f827f33d0ca6676a4 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 20 May 2021 12:59:08 +0200 Subject: [PATCH] ci(nix): switch to stable rust in shell.nix Switch to https://github.com/oxalica/rust-overlay for rustc binaries. Drop x86_64-unknown-linux-gnu from target list as host is included by default. --- ci/shell.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ci/shell.nix b/ci/shell.nix index 1513ea9b8..46980ef02 100644 --- a/ci/shell.nix +++ b/ci/shell.nix @@ -3,15 +3,15 @@ }: let - mozillaOverlay = import (builtins.fetchTarball { - url = "https://github.com/mozilla/nixpkgs-mozilla/archive/8c007b60731c07dd7a052cce508de3bb1ae849b4.tar.gz"; - sha256 = "1zybp62zz0h077zm2zmqs2wcg3whg6jqaah9hcl1gv4x8af4zhs6"; + rustOverlay = import (builtins.fetchTarball { + url = "https://github.com/oxalica/rust-overlay/archive/4d5d8e4288a8e0efd074e56a448e450b0f8df975.tar.gz"; + sha256 = "1v3xlpna3q5klnhrn3p43bdh24ynaf31s2980r98ypvdpi2wi018"; }); # the last successful build of nixpkgs-unstable as of 2021-05-07 nixpkgs = import (builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/e62feb3bf4a603e26755238303bda0c24651e155.tar.gz"; sha256 = "1gkamm044jrksjrisr7h9grg8p2y6rk01x6391asrx988hm2rh9s"; - }) { overlays = [ mozillaOverlay ]; }; + }) { overlays = [ rustOverlay ]; }; moneroTests = nixpkgs.fetchurl { url = "https://github.com/ph4r05/monero/releases/download/v0.17.1.9-tests/trezor_tests"; sha256 = "410bc4ff2ff1edc65e17f15b549bd1bf8a3776cf67abdea86aed52cf4bce8d9d"; @@ -22,11 +22,10 @@ let ${nixpkgs.patchelf}/bin/patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out" chmod -w $out ''; - rustNightly = (nixpkgs.rustChannelOf { date = "2021-03-29"; channel = "nightly"; }).rust.override { + rustStable = nixpkgs.rust-bin.stable."1.52.1".default.override { targets = [ - "x86_64-unknown-linux-gnu" # emulator - "thumbv7em-none-eabihf" # TT - "thumbv7em-none-eabi" # T1 + "thumbv7em-none-eabihf" # TT + "thumbv7m-none-eabi" # T1 ]; }; in @@ -64,7 +63,7 @@ stdenv.mkDerivation ({ poetry protobuf3_6 rustfmt - rustNightly + rustStable wget zlib ] ++ lib.optionals (!stdenv.isDarwin) [