kvmtool: cleanup make flags

The make flags CROSS_COMPILE and ARCH can be unconditionally set and we
can use attributes under `stdenv` to apply the correct values.
This commit is contained in:
Jared Baur 2024-06-19 14:03:48 -07:00
parent 4c87dbdc46
commit 0b581b1626
No known key found for this signature in database

View File

@ -18,11 +18,10 @@ stdenv.mkDerivation {
makeFlags = [
"prefix=${placeholder "out"}"
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
"ARCH=${stdenv.hostPlatform.linuxArch}"
] ++ lib.optionals stdenv.hostPlatform.isAarch64 ([
"LIBFDT_DIR=${dtc}/lib"
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"CROSS_COMPILE=aarch64-unknown-linux-gnu-"
"ARCH=arm64"
]);
meta = with lib; {