about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJared Baur <jaredbaur@fastmail.com>2024-06-19 14:03:48 -0700
committerJared Baur <jaredbaur@fastmail.com>2024-06-19 14:03:48 -0700
commit0b581b1626693f428d3d78118e1a7260e6c8a5e1 (patch)
tree112b2bf4aa4647e4e505f409819cc194eba3a925
parent4c87dbdc46f0c4cdeb4bde53f1a3f154936391ab (diff)
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.
-rw-r--r--pkgs/applications/virtualization/kvmtool/default.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/applications/virtualization/kvmtool/default.nix b/pkgs/applications/virtualization/kvmtool/default.nix
index dc16ce6b2c0ca..880334294af66 100644
--- a/pkgs/applications/virtualization/kvmtool/default.nix
+++ b/pkgs/applications/virtualization/kvmtool/default.nix
@@ -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; {