flake: use proper uefi target in general

Remove the x86_64 hardcoding.
This commit is contained in:
Raito Bezarius 2023-09-14 16:55:11 +02:00
parent 0b5ce324d7
commit 976faf9bf5
1 changed files with 3 additions and 2 deletions

View File

@ -79,6 +79,7 @@
perSystem = { config, system, pkgs, ... }:
let
rustTarget = "${pkgs.hostPlatform.qemuArch}-unknown-uefi";
pkgs = import nixpkgs {
system = system;
overlays = [
@ -89,7 +90,7 @@
inherit (pkgs) lib;
uefi-rust-stable = pkgs.rust-bin.fromRustupToolchainFile ./rust/uefi/rust-toolchain.toml;
craneLib = crane.lib.x86_64-linux.overrideToolchain uefi-rust-stable;
craneLib = crane.lib.${system}.overrideToolchain uefi-rust-stable;
# Build attributes for a Rust application.
buildRustApp = lib.makeOverridable (
@ -145,7 +146,7 @@
stubCrane = buildRustApp {
pname = "lanzaboote-stub";
src = craneLib.cleanCargoSource ./rust/uefi;
target = "x86_64-unknown-uefi";
target = rustTarget;
doCheck = false;
};