Browse Source

firmware: prevent Nix from corrupting output ELF

pull/1/head
parent
commit
87acbacf87
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      firmware/default.nix

+ 2
- 0
firmware/default.nix View File

@ -7,6 +7,8 @@ rustPlatform.buildRustPackage rec {
src = ./.;
cargoSha256 = "0kf2pnfylfmzm0qvi4jfci43qvrnj1v5f037sb9zpvfqyddhdffl";
phases = ["unpackPhase" "buildPhase" "installPhase"];
buildPhase = ''
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
export RUSTFLAGS="-L ${rust-riscv32i-crates}/lib/rustlib/riscv32i-unknown-none-elf/lib -C linker=${binutils-riscv32}/bin/riscv32-unknown-elf-ld -C link-arg=-Tlink.x"


Loading…
Cancel
Save