1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 06:18:07 +00:00

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.
This commit is contained in:
Martin Milata 2021-05-20 12:59:08 +02:00
parent bd06b72923
commit f771dc6f60

View File

@ -3,15 +3,15 @@
}: }:
let let
mozillaOverlay = import (builtins.fetchTarball { rustOverlay = import (builtins.fetchTarball {
url = "https://github.com/mozilla/nixpkgs-mozilla/archive/8c007b60731c07dd7a052cce508de3bb1ae849b4.tar.gz"; url = "https://github.com/oxalica/rust-overlay/archive/4d5d8e4288a8e0efd074e56a448e450b0f8df975.tar.gz";
sha256 = "1zybp62zz0h077zm2zmqs2wcg3whg6jqaah9hcl1gv4x8af4zhs6"; sha256 = "1v3xlpna3q5klnhrn3p43bdh24ynaf31s2980r98ypvdpi2wi018";
}); });
# the last successful build of nixpkgs-unstable as of 2021-05-07 # the last successful build of nixpkgs-unstable as of 2021-05-07
nixpkgs = import (builtins.fetchTarball { nixpkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/e62feb3bf4a603e26755238303bda0c24651e155.tar.gz"; url = "https://github.com/NixOS/nixpkgs/archive/e62feb3bf4a603e26755238303bda0c24651e155.tar.gz";
sha256 = "1gkamm044jrksjrisr7h9grg8p2y6rk01x6391asrx988hm2rh9s"; sha256 = "1gkamm044jrksjrisr7h9grg8p2y6rk01x6391asrx988hm2rh9s";
}) { overlays = [ mozillaOverlay ]; }; }) { overlays = [ rustOverlay ]; };
moneroTests = nixpkgs.fetchurl { moneroTests = nixpkgs.fetchurl {
url = "https://github.com/ph4r05/monero/releases/download/v0.17.1.9-tests/trezor_tests"; url = "https://github.com/ph4r05/monero/releases/download/v0.17.1.9-tests/trezor_tests";
sha256 = "410bc4ff2ff1edc65e17f15b549bd1bf8a3776cf67abdea86aed52cf4bce8d9d"; sha256 = "410bc4ff2ff1edc65e17f15b549bd1bf8a3776cf67abdea86aed52cf4bce8d9d";
@ -22,11 +22,10 @@ let
${nixpkgs.patchelf}/bin/patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out" ${nixpkgs.patchelf}/bin/patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out"
chmod -w $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 = [ targets = [
"x86_64-unknown-linux-gnu" # emulator "thumbv7em-none-eabihf" # TT
"thumbv7em-none-eabihf" # TT "thumbv7m-none-eabi" # T1
"thumbv7em-none-eabi" # T1
]; ];
}; };
in in
@ -64,7 +63,7 @@ stdenv.mkDerivation ({
poetry poetry
protobuf3_6 protobuf3_6
rustfmt rustfmt
rustNightly rustStable
wget wget
zlib zlib
] ++ lib.optionals (!stdenv.isDarwin) [ ] ++ lib.optionals (!stdenv.isDarwin) [