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

ci: unified shell.nix for hardware tests

This commit is contained in:
Martin Milata 2021-03-25 23:25:53 +01:00
parent 720eaa3abd
commit 8e00904a3f
4 changed files with 16 additions and 21 deletions

View File

@ -36,7 +36,6 @@ ENV \
# Trezor specific stuff starts here
COPY nixpkgs.nix nixpkgs.nix
COPY shell.nix shell.nix
# to make multiple python versions and monero test suite available, run docker build

View File

@ -1,14 +1,3 @@
with import ../nixpkgs.nix;
{ fullDeps ? false }:
stdenv.mkDerivation rec {
name = "trezor-firmware-hardware-tests";
buildInputs = [
(callPackage ./uhubctl.nix { }) # HACK FIXME replace this with just uhubctl once pinned version of nixpkgs is updated
ffmpeg
poetry
libusb1
dejavu_fonts
];
LD_LIBRARY_PATH = "${libusb1}/lib";
NIX_ENFORCE_PURITY = 0;
}
import ../shell.nix { inherit fullDeps; hardwareTest = true; }

View File

@ -1,5 +0,0 @@
# the last successful build of nixpkgs-unstable as of 2020-12-30
import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/bea44d5ebe332260aa34a1bd48250b6364527356.tar.gz";
sha256 = "14sfk04iyvyh3jl1s2wayw1y077dwpk2d712nhjk1wwfjkdq03r3";
}) { }

View File

@ -1,6 +1,14 @@
{ fullDeps ? false }:
{ fullDeps ? false
, hardwareTest ? false
}:
# the last successful build of nixpkgs-unstable as of 2020-12-30
with import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/bea44d5ebe332260aa34a1bd48250b6364527356.tar.gz";
sha256 = "14sfk04iyvyh3jl1s2wayw1y077dwpk2d712nhjk1wwfjkdq03r3";
})
{ };
with import ./nixpkgs.nix;
let
moneroTests = fetchurl {
url = "https://github.com/ph4r05/monero/releases/download/v0.17.1.9-tests/trezor_tests";
@ -61,6 +69,10 @@ stdenv.mkDerivation ({
darwin.apple_sdk.frameworks.Metal
darwin.libobjc
libiconv
] ++ lib.optionals hardwareTest [
(callPackage ./hardware_tests/uhubctl.nix { }) # HACK FIXME replace this with just uhubctl once pinned version of nixpkgs is updated
ffmpeg
dejavu_fonts
];
LD_LIBRARY_PATH = "${libffi}/lib:${libjpeg.out}/lib:${libusb1}/lib:${libressl.out}/lib";
NIX_ENFORCE_PURITY = 0;