firmware: prevent Nix from corrupting output ELF
This commit is contained in:
parent
3deb18c261
commit
87acbacf87
@ -7,6 +7,8 @@ rustPlatform.buildRustPackage rec {
|
|||||||
src = ./.;
|
src = ./.;
|
||||||
cargoSha256 = "0kf2pnfylfmzm0qvi4jfci43qvrnj1v5f037sb9zpvfqyddhdffl";
|
cargoSha256 = "0kf2pnfylfmzm0qvi4jfci43qvrnj1v5f037sb9zpvfqyddhdffl";
|
||||||
|
|
||||||
|
phases = ["unpackPhase" "buildPhase" "installPhase"];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
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"
|
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…
Reference in New Issue
Block a user