mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 12:28:09 +00:00
ci: bump nixpkgs to latest nixpkgs-unstable
[no changelog]
This commit is contained in:
parent
37d0d91a84
commit
a0aa414aa0
51
ci/shell.nix
51
ci/shell.nix
@ -3,18 +3,18 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
# the last commit from master as of 2022-08-02
|
# the last commit from master as of 2023-04-14
|
||||||
rustOverlay = import (builtins.fetchTarball {
|
rustOverlay = import (builtins.fetchTarball {
|
||||||
url = "https://github.com/oxalica/rust-overlay/archive/b38c1683594aeefa5c3c4dde115401f059146be6.tar.gz";
|
url = "https://github.com/oxalica/rust-overlay/archive/db7bf4a2dd295adeeaa809d36387098926a15487.tar.gz";
|
||||||
sha256 = "0rk4i42cys2v7k2ir57x5qa8dc37nrs432cdpbr4cddskgvyi8ky";
|
sha256 = "0gk6kag09w8lyn9was8dpjgslxw5p81bx04379m9v6ky09kw482d";
|
||||||
});
|
});
|
||||||
# the last successful build of nixpkgs-unstable as of 2022-06-20
|
# the last successful build of nixpkgs-unstable as of 2023-04-14
|
||||||
nixpkgs = import (builtins.fetchTarball {
|
nixpkgs = import (builtins.fetchTarball {
|
||||||
url = "https://github.com/NixOS/nixpkgs/archive/e0a42267f73ea52adc061a64650fddc59906fc99.tar.gz";
|
url = "https://github.com/NixOS/nixpkgs/archive/c58e6fbf258df1572b535ac1868ec42faf7675dd.tar.gz";
|
||||||
sha256 = "0r1dsj51x2rm016xwvdnkm94v517jb1rpn4rk63k6krc4d0n3kh9";
|
sha256 = "18pna0yinvdprhhcmhyanlgrmgf81nwpc0j2z9fy9mc8cqkx3937";
|
||||||
}) { overlays = [ rustOverlay ]; };
|
}) { overlays = [ rustOverlay ]; };
|
||||||
# commit before python36 was removed
|
# commit before python36 was removed
|
||||||
python36nixpkgs = import (builtins.fetchTarball {
|
oldPythonNixpkgs = import (builtins.fetchTarball {
|
||||||
url = "https://github.com/NixOS/nixpkgs/archive/b9126f77f553974c90ab65520eff6655415fc5f4.tar.gz";
|
url = "https://github.com/NixOS/nixpkgs/archive/b9126f77f553974c90ab65520eff6655415fc5f4.tar.gz";
|
||||||
sha256 = "02s3qkb6kz3ndyx7rfndjbvp4vlwiqc42fxypn3g6jnc0v5jyz95";
|
sha256 = "02s3qkb6kz3ndyx7rfndjbvp4vlwiqc42fxypn3g6jnc0v5jyz95";
|
||||||
}) { };
|
}) { };
|
||||||
@ -28,8 +28,19 @@ 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
|
||||||
'';
|
'';
|
||||||
|
# do not expose rust's gcc: https://github.com/oxalica/rust-overlay/issues/70
|
||||||
|
# Create a wrapper that only exposes $pkg/bin. This prevents pulling in
|
||||||
|
# development deps, packages to a nix-shell. This is especially important
|
||||||
|
# when packages are combined from different nixpkgs versions.
|
||||||
|
mkBinOnlyWrapper = pkg:
|
||||||
|
nixpkgs.runCommand "${pkg.pname}-${pkg.version}-bin" { inherit (pkg) meta; } ''
|
||||||
|
mkdir -p "$out/bin"
|
||||||
|
for bin in "${nixpkgs.lib.getBin pkg}/bin/"*; do
|
||||||
|
ln -s "$bin" "$out/bin/"
|
||||||
|
done
|
||||||
|
'';
|
||||||
# NOTE: don't forget to update Minimum Supported Rust Version in docs/core/build/emulator.md
|
# NOTE: don't forget to update Minimum Supported Rust Version in docs/core/build/emulator.md
|
||||||
rustProfiles = nixpkgs.rust-bin.nightly."2022-08-02";
|
rustProfiles = nixpkgs.rust-bin.nightly."2023-04-14";
|
||||||
rustNightly = rustProfiles.minimal.override {
|
rustNightly = rustProfiles.minimal.override {
|
||||||
targets = [
|
targets = [
|
||||||
"thumbv7em-none-eabihf" # TT
|
"thumbv7em-none-eabihf" # TT
|
||||||
@ -42,17 +53,6 @@ let
|
|||||||
llvmPackages = nixpkgs.llvmPackages_13;
|
llvmPackages = nixpkgs.llvmPackages_13;
|
||||||
# see pyright/README.md for update procedure
|
# see pyright/README.md for update procedure
|
||||||
pyright = nixpkgs.callPackage ./pyright {};
|
pyright = nixpkgs.callPackage ./pyright {};
|
||||||
# HWI tests need https://github.com/bitcoin/bitcoin/pull/22558
|
|
||||||
# remove this once nixpkgs version contains this patch
|
|
||||||
bitcoind = (nixpkgs.bitcoind.overrideAttrs (attrs: {
|
|
||||||
version = attrs.version + "-taproot-psbt";
|
|
||||||
src = nixpkgs.fetchFromGitHub {
|
|
||||||
owner = "achow101";
|
|
||||||
repo = "bitcoin";
|
|
||||||
rev = "b704884935766748cf533577c1babacfb6d4b5a5"; # taproot-psbt
|
|
||||||
sha256 = "sha256-gz/knimKY1pkpsp1YmYHPMCbeiSxKGSOGJOSEgFbptE=";
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
in
|
in
|
||||||
with nixpkgs;
|
with nixpkgs;
|
||||||
stdenvNoCC.mkDerivation ({
|
stdenvNoCC.mkDerivation ({
|
||||||
@ -61,12 +61,12 @@ stdenvNoCC.mkDerivation ({
|
|||||||
bitcoind
|
bitcoind
|
||||||
# install other python versions for tox testing
|
# install other python versions for tox testing
|
||||||
# NOTE: running e.g. "python3" in the shell runs the first version in the following list,
|
# NOTE: running e.g. "python3" in the shell runs the first version in the following list,
|
||||||
# and poetry uses the default version (currently 3.9)
|
# and poetry uses the default version (currently 3.10)
|
||||||
python39
|
|
||||||
python310
|
python310
|
||||||
|
python39
|
||||||
python38
|
python38
|
||||||
python37
|
oldPythonNixpkgs.python37
|
||||||
python36nixpkgs.python36
|
oldPythonNixpkgs.python36
|
||||||
] ++ [
|
] ++ [
|
||||||
SDL2
|
SDL2
|
||||||
SDL2_image
|
SDL2_image
|
||||||
@ -74,6 +74,7 @@ stdenvNoCC.mkDerivation ({
|
|||||||
check
|
check
|
||||||
curl # for connect tests
|
curl # for connect tests
|
||||||
editorconfig-checker
|
editorconfig-checker
|
||||||
|
gcc11
|
||||||
gcc-arm-embedded
|
gcc-arm-embedded
|
||||||
git
|
git
|
||||||
gitAndTools.git-subrepo
|
gitAndTools.git-subrepo
|
||||||
@ -86,9 +87,9 @@ stdenvNoCC.mkDerivation ({
|
|||||||
openssl
|
openssl
|
||||||
pkgconfig
|
pkgconfig
|
||||||
poetry
|
poetry
|
||||||
protobuf
|
protobuf3_19
|
||||||
pyright
|
pyright
|
||||||
rustNightly
|
(mkBinOnlyWrapper rustNightly)
|
||||||
wget
|
wget
|
||||||
zlib
|
zlib
|
||||||
moreutils
|
moreutils
|
||||||
|
@ -149,7 +149,8 @@ core monero test:
|
|||||||
variables:
|
variables:
|
||||||
TREZOR_PROFILING: 1
|
TREZOR_PROFILING: 1
|
||||||
script:
|
script:
|
||||||
- $NIX_SHELL --arg fullDeps true --run "poetry run make -C core test_emu_monero | ts -s"
|
# see `python test` job for _PYTHON_SYSCONFIGDATA_NAME explanation
|
||||||
|
- $NIX_SHELL --arg fullDeps true --run "unset _PYTHON_SYSCONFIGDATA_NAME && poetry run make -C core test_emu_monero | ts -s"
|
||||||
- mv core/src/.coverage core/.coverage.test_emu_monero
|
- mv core/src/.coverage core/.coverage.test_emu_monero
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||||
|
@ -158,63 +158,63 @@ Device tests excluding altcoins, only for BTC.
|
|||||||
### [core monero test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L144)
|
### [core monero test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L144)
|
||||||
Monero tests.
|
Monero tests.
|
||||||
|
|
||||||
### [core monero asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L163)
|
### [core monero asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L164)
|
||||||
|
|
||||||
### [core u2f test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L185)
|
### [core u2f test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L186)
|
||||||
Tests for U2F and HID.
|
Tests for U2F and HID.
|
||||||
|
|
||||||
### [core u2f asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L204)
|
### [core u2f asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L205)
|
||||||
|
|
||||||
### [core fido2 test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L222)
|
### [core fido2 test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L223)
|
||||||
FIDO2 device tests.
|
FIDO2 device tests.
|
||||||
|
|
||||||
### [core fido2 asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L245)
|
### [core fido2 asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L246)
|
||||||
|
|
||||||
### [core click test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L265)
|
### [core click test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L266)
|
||||||
Click tests - UI.
|
Click tests - UI.
|
||||||
See [docs/tests/click-tests](../tests/click-tests.md) for more info.
|
See [docs/tests/click-tests](../tests/click-tests.md) for more info.
|
||||||
|
|
||||||
### [core click asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L294)
|
### [core click asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L295)
|
||||||
|
|
||||||
### [core upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L315)
|
### [core upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L316)
|
||||||
Upgrade tests.
|
Upgrade tests.
|
||||||
See [docs/tests/upgrade-tests](../tests/upgrade-tests.md) for more info.
|
See [docs/tests/upgrade-tests](../tests/upgrade-tests.md) for more info.
|
||||||
|
|
||||||
### [core upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L334)
|
### [core upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L335)
|
||||||
|
|
||||||
### [core persistence test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L356)
|
### [core persistence test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L357)
|
||||||
Persistence tests - UI.
|
Persistence tests - UI.
|
||||||
|
|
||||||
### [core persistence asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L385)
|
### [core persistence asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L386)
|
||||||
|
|
||||||
### [core hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L403)
|
### [core hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L404)
|
||||||
|
|
||||||
### [crypto test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L421)
|
### [crypto test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L422)
|
||||||
|
|
||||||
### [legacy device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L453)
|
### [legacy device test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L454)
|
||||||
Legacy device test - UI.
|
Legacy device test - UI.
|
||||||
|
|
||||||
### [legacy asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L480)
|
### [legacy asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L481)
|
||||||
|
|
||||||
### [legacy btconly test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L492)
|
### [legacy btconly test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L493)
|
||||||
|
|
||||||
### [legacy btconly asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L512)
|
### [legacy btconly asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L513)
|
||||||
|
|
||||||
### [legacy upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L527)
|
### [legacy upgrade test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L528)
|
||||||
|
|
||||||
### [legacy upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L546)
|
### [legacy upgrade asan test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L547)
|
||||||
|
|
||||||
### [legacy hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L567)
|
### [legacy hwi test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L568)
|
||||||
|
|
||||||
### [python test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L586)
|
### [python test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L587)
|
||||||
|
|
||||||
### [python support test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L605)
|
### [python support test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L606)
|
||||||
|
|
||||||
### [storage test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L615)
|
### [storage test](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L616)
|
||||||
|
|
||||||
### [core unix memory profiler](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L639)
|
### [core unix memory profiler](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L640)
|
||||||
|
|
||||||
### [connect test core](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L663)
|
### [connect test core](https://github.com/trezor/trezor-firmware/blob/master/ci/test.yml#L664)
|
||||||
|
|
||||||
---
|
---
|
||||||
## TEST-HW stage - [test-hw.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml)
|
## TEST-HW stage - [test-hw.yml](https://github.com/trezor/trezor-firmware/blob/master/ci/test-hw.yml)
|
||||||
|
@ -21,4 +21,4 @@ chmod u+x emulators/trezor-emu-*
|
|||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
# are we in Nix(OS)?
|
# are we in Nix(OS)?
|
||||||
command -v nix-shell >/dev/null && nix-shell --run "autoPatchelf tests/emulators"
|
command -v nix-shell >/dev/null && nix-shell --run 'NIX_BINTOOLS=$NIX_BINTOOLS_FOR_TARGET autoPatchelf tests/emulators'
|
||||||
|
Loading…
Reference in New Issue
Block a user