1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-19 21:08:07 +00:00

ci/Dockerfile: use nix-shell instead of nix-env

This commit is contained in:
Pavol Rusnak 2020-06-07 23:22:03 +02:00
parent 426382da7c
commit 8f6a6c098e
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -37,23 +37,21 @@ ENV \
COPY shell.nix shell.nix COPY shell.nix shell.nix
RUN nix-env -i -f shell.nix -A buildInputs RUN nix-shell --run "echo deps pre-installed"
CMD [ "nix-shell" ] CMD [ "nix-shell" ]
# the rest of the file only applies when docker build is called # the rest of the file only applies when docker build is called
# with the following argument: "--build-arg FULLDEPS_TESTING=1" # with the following argument: "--build-arg FULLDEPS_TESTING=1"
ENV TREZOR_MONERO_TESTS_PATH="/opt/trezor_monero_tests"
ARG FULLDEPS_TESTING=0 ARG FULLDEPS_TESTING=0
ENV FULLDEPS_TESTING=${FULLDEPS_TESTING} ENV FULLDEPS_TESTING=${FULLDEPS_TESTING}
# install other python versions for tox testing # install other python versions for tox testing
RUN if [ "${FULLDEPS_TESTING}" = "1" ]; then \ RUN if [ "${FULLDEPS_TESTING}" = "1" ]; then \
nix-env -iP python3-3.8.2 ; \ nix-env -iP python3-3.7.7 ; \
nix-env --set-flag priority 6 python3-3.8.2 ; \ nix-env --set-flag priority 6 python3-3.7.7 ; \
nix-env -iP python3-3.6.10 ; \ nix-env -iP python3-3.6.10 ; \
nix-env --set-flag priority 7 python3-3.6.10 ; \ nix-env --set-flag priority 7 python3-3.6.10 ; \
nix-env -iP python3-3.5.9 ; \ nix-env -iP python3-3.5.9 ; \
@ -62,6 +60,7 @@ RUN if [ "${FULLDEPS_TESTING}" = "1" ]; then \
# download monero tests binary # download monero tests binary
ENV TREZOR_MONERO_TESTS_PATH="/opt/trezor_monero_tests"
RUN if [ "${FULLDEPS_TESTING}" = "1" ]; then \ RUN if [ "${FULLDEPS_TESTING}" = "1" ]; then \
TREZOR_MONERO_TESTS_SHA256SUM=1e5dfdb07de4ea46088f4a5bdb0d51f040fe479019efae30f76427eee6edb3f7 ; \ TREZOR_MONERO_TESTS_SHA256SUM=1e5dfdb07de4ea46088f4a5bdb0d51f040fe479019efae30f76427eee6edb3f7 ; \
TREZOR_MONERO_TESTS_URL="https://github.com/ph4r05/monero/releases/download/v0.15.0.0-tests-u18.04-03/trezor_tests" ; \ TREZOR_MONERO_TESTS_URL="https://github.com/ph4r05/monero/releases/download/v0.15.0.0-tests-u18.04-03/trezor_tests" ; \