ci(nix): update to latest nixpkgs-unstable, rustc

[no changelog]
pull/3412/head
Martin Milata 7 months ago
parent 86e543c8d3
commit e5d455a607

@ -1,4 +1,4 @@
{ pkgs, nodejs-14_x, stdenv, lib, ... }:
{ pkgs, stdenv, lib, ... }:
let
@ -7,8 +7,6 @@ let
nodePackages = import ./node-composition.nix {
inherit pkgs;
inherit (stdenv.hostPlatform) system;
# FIXME: drop after https://github.com/NixOS/nixpkgs/issues/145432 is fixed
nodejs = nodejs-14_x;
};
in
nodePackages."${packageName}".override {

@ -2,7 +2,7 @@
#! nix-shell -i bash -p nodePackages.node2nix
node2nix \
--nodejs-14 \
--nodejs-18 \
--development \
--input package.json \
--output node-packages.nix \

@ -4,17 +4,17 @@
}:
let
# the last commit from master as of 2023-04-14
# the last commit from master as of 2024-04-10
rustOverlay = import (builtins.fetchTarball {
url = "https://github.com/oxalica/rust-overlay/archive/db7bf4a2dd295adeeaa809d36387098926a15487.tar.gz";
sha256 = "0gk6kag09w8lyn9was8dpjgslxw5p81bx04379m9v6ky09kw482d";
url = "https://github.com/oxalica/rust-overlay/archive/9ef1eca23bee5fb8080863909af3802130b2ee57.tar.gz";
sha256 = "12k1cdjjlw28xwhmcxzy5qzbpbdgh7q9nb86j1g9iyyml8cppv5q";
});
# define this variable and devTools if you want nrf{util,connect}
acceptJlink = builtins.getEnv "TREZOR_FIRMWARE_ACCEPT_JLINK_LICENSE" == "yes";
# the last successful build of nixpkgs-unstable as of 2023-04-14
# the last successful build of nixpkgs-unstable as of 2024-04-10
nixpkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/c58e6fbf258df1572b535ac1868ec42faf7675dd.tar.gz";
sha256 = "18pna0yinvdprhhcmhyanlgrmgf81nwpc0j2z9fy9mc8cqkx3937";
url = "https://github.com/NixOS/nixpkgs/archive/a76c4553d7e741e17f289224eda135423de0491d.tar.gz";
sha256 = "0rwdzp942b8ay625lqgra83qrp64b3wqm6w9a0i4z593df8x822v";
}) {
config = {
allowUnfree = acceptJlink;
@ -49,7 +49,7 @@ let
done
'';
# NOTE: don't forget to update Minimum Supported Rust Version in docs/core/build/emulator.md
rustProfiles = nixpkgs.rust-bin.nightly."2023-04-14";
rustProfiles = nixpkgs.rust-bin.nightly."2024-04-10";
rustNightly = rustProfiles.minimal.override {
targets = [
"thumbv7em-none-eabihf" # TT
@ -80,17 +80,18 @@ in
with nixpkgs;
stdenvNoCC.mkDerivation ({
name = "trezor-firmware-env";
buildInputs = lib.optionals fullDeps [
bitcoind
buildInputs = [
# install other python versions for tox testing
# NOTE: running e.g. "python3" in the shell runs the first version in the following list,
# and poetry uses the default version (currently 3.10)
python311
] ++ lib.optionals fullDeps [
python310
python39
python38
oldPythonNixpkgs.python37
oldPythonNixpkgs.python36
bitcoind
] ++ [
SDL2
SDL2_image
@ -110,9 +111,9 @@ stdenvNoCC.mkDerivation ({
libusb1
llvmPackages.clang
openssl
pkgconfig
pkg-config
poetry
protobuf3_19
protobuf3_20
pyright
(mkBinOnlyWrapper rustNightly)
wget

@ -496,7 +496,8 @@ env.Replace(
MAKECMAKELISTS='$PYTHON tools/make_cmakelists.py',
MPY_TOOL='$PYTHON vendor/micropython/tools/mpy-tool.py',
MPY_CROSS='vendor/micropython/mpy-cross/mpy-cross -O' + PYOPT,
PB2PY='$PYTHON ../common/protob/pb2py',
# LD_LIBRARY_PATH workaround: https://discourse.nixos.org/t/nixpkgs-nixos-unstable-many-package-fail-with-glibc-2-38-not-found/35078 https://github.com/NixOS/nixpkgs/issues/287764
PB2PY='unset LD_LIBRARY_PATH && $PYTHON ../common/protob/pb2py',
)
#

@ -579,7 +579,8 @@ env.Replace(
MAKECMAKELISTS='$PYTHON tools/make_cmakelists.py',
MPY_TOOL='$PYTHON vendor/micropython/tools/mpy-tool.py',
MPY_CROSS='vendor/micropython/mpy-cross/mpy-cross -O' + PYOPT,
PB2PY='$PYTHON ../common/protob/pb2py',
# LD_LIBRARY_PATH workaround: https://discourse.nixos.org/t/nixpkgs-nixos-unstable-many-package-fail-with-glibc-2-38-not-found/35078 https://github.com/NixOS/nixpkgs/issues/287764
PB2PY='unset LD_LIBRARY_PATH && $PYTHON ../common/protob/pb2py',
)
#

@ -26,6 +26,8 @@ do_rebuild() {
local param="--python-outdir"
fi
# LD_LIBRARY_PATH workaround: https://discourse.nixos.org/t/nixpkgs-nixos-unstable-many-package-fail-with-glibc-2-38-not-found/35078 https://github.com/NixOS/nixpkgs/issues/287764
unset LD_LIBRARY_PATH
# note $SOURCES is unquoted - we want wildcard expansion and multiple args
$PROTOB/pb2py "$@" $param="$OUTPUT" $SOURCES
}

Loading…
Cancel
Save