linuxPackages_5_4.wireguard: fix cross build

This commit is contained in:
Yorick van Pelt 2022-07-19 16:39:37 +02:00
parent 32cfc505c6
commit 941367cba5
No known key found for this signature in database
GPG Key ID: A36E70F9DC014A15

View File

@ -20,6 +20,11 @@ stdenv.mkDerivation rec {
preBuild = "cd src";
buildFlags = [ "module" ];
makeFlags = [
"ARCH=${stdenv.hostPlatform.linuxArch}"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
];
INSTALL_MOD_PATH = placeholder "out";
installFlags = [ "DEPMOD=true" ];