firmware: deal with rust nonsense

Fixes
"error: edition 2021 is unstable and only available with -Z unstable-options.
error: could not compile `alloc`"
This commit is contained in:
Sebastien Bourdeauducq 2023-09-14 10:57:37 +08:00
parent 8381b34a79
commit 8ca75a3fb9
1 changed files with 10 additions and 7 deletions

View File

@ -43,6 +43,10 @@
cargo = rust; cargo = rust;
}); });
cargo-xbuild = pkgs.cargo-xbuild.overrideAttrs(oa: {
postPatch = "substituteInPlace src/sysroot.rs --replace 2021 2018";
});
vivadoDeps = pkgs: with pkgs; let vivadoDeps = pkgs: with pkgs; let
# Apply patch from https://github.com/nix-community/nix-environments/pull/54 # Apply patch from https://github.com/nix-community/nix-environments/pull/54
# to fix ncurses libtinfo.so's soname issue # to fix ncurses libtinfo.so's soname issue
@ -50,8 +54,7 @@
configureFlags = old.configureFlags ++ [ "--with-termlib" ]; configureFlags = old.configureFlags ++ [ "--with-termlib" ];
postFixup = ""; postFixup = "";
}); });
in in [
[
libxcrypt-legacy libxcrypt-legacy
(ncurses'.override { unicodeSupport = false; }) (ncurses'.override { unicodeSupport = false; })
zlib zlib
@ -263,7 +266,7 @@
nativeBuildInputs = [ nativeBuildInputs = [
(pkgs.python3.withPackages(ps: [ migen misoc (artiq.withExperimentalFeatures experimentalFeatures) ps.packaging ])) (pkgs.python3.withPackages(ps: [ migen misoc (artiq.withExperimentalFeatures experimentalFeatures) ps.packaging ]))
rust rust
pkgs.cargo-xbuild cargo-xbuild
pkgs.llvmPackages_14.clang-unwrapped pkgs.llvmPackages_14.clang-unwrapped
pkgs.llvm_14 pkgs.llvm_14
pkgs.lld_14 pkgs.lld_14
@ -435,7 +438,7 @@
buildInputs = [ buildInputs = [
(pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ migen misoc ps.paramiko microscope ps.packaging ] ++ artiq.propagatedBuildInputs )) (pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ migen misoc ps.paramiko microscope ps.packaging ] ++ artiq.propagatedBuildInputs ))
rust rust
pkgs.cargo-xbuild cargo-xbuild
pkgs.llvmPackages_14.clang-unwrapped pkgs.llvmPackages_14.clang-unwrapped
pkgs.llvm_14 pkgs.llvm_14
pkgs.lld_14 pkgs.lld_14
@ -463,7 +466,7 @@
buildInputs = [ buildInputs = [
(pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ migen misoc artiq ps.packaging ])) (pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ migen misoc artiq ps.packaging ]))
rust rust
pkgs.cargo-xbuild cargo-xbuild
pkgs.llvmPackages_14.clang-unwrapped pkgs.llvmPackages_14.clang-unwrapped
pkgs.llvm_14 pkgs.llvm_14
pkgs.lld_14 pkgs.lld_14