flake: use proper uefi target in general
Remove the x86_64 hardcoding.
This commit is contained in:
parent
0b5ce324d7
commit
976faf9bf5
|
@ -79,6 +79,7 @@
|
||||||
|
|
||||||
perSystem = { config, system, pkgs, ... }:
|
perSystem = { config, system, pkgs, ... }:
|
||||||
let
|
let
|
||||||
|
rustTarget = "${pkgs.hostPlatform.qemuArch}-unknown-uefi";
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
system = system;
|
system = system;
|
||||||
overlays = [
|
overlays = [
|
||||||
|
@ -89,7 +90,7 @@
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
uefi-rust-stable = pkgs.rust-bin.fromRustupToolchainFile ./rust/uefi/rust-toolchain.toml;
|
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.
|
# Build attributes for a Rust application.
|
||||||
buildRustApp = lib.makeOverridable (
|
buildRustApp = lib.makeOverridable (
|
||||||
|
@ -145,7 +146,7 @@
|
||||||
stubCrane = buildRustApp {
|
stubCrane = buildRustApp {
|
||||||
pname = "lanzaboote-stub";
|
pname = "lanzaboote-stub";
|
||||||
src = craneLib.cleanCargoSource ./rust/uefi;
|
src = craneLib.cleanCargoSource ./rust/uefi;
|
||||||
target = "x86_64-unknown-uefi";
|
target = rustTarget;
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue