keepalived: disable net-snmp support when cross compiling

net-snmp support requires running net-snmp-config which is not
executable on build platform
This commit is contained in:
Nick Cao 2023-12-30 11:12:25 -05:00
parent 2961883989
commit b04954bf14
No known key found for this signature in database

View File

@ -1,7 +1,17 @@
{ lib, stdenv, fetchFromGitHub, nixosTests
, file, libmnl, libnftnl, libnl
, net-snmp, openssl, pkg-config
, autoreconfHook }:
{ lib
, stdenv
, fetchFromGitHub
, nixosTests
, file
, libmnl
, libnftnl
, libnl
, net-snmp
, openssl
, pkg-config
, autoreconfHook
, withNetSnmp ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
}:
stdenv.mkDerivation rec {
pname = "keepalived";
@ -19,8 +29,9 @@ stdenv.mkDerivation rec {
libmnl
libnftnl
libnl
net-snmp
openssl
] ++ lib.optionals withNetSnmp [
net-snmp
];
enableParallelBuilding = true;
@ -31,8 +42,9 @@ stdenv.mkDerivation rec {
configureFlags = [
"--enable-sha1"
] ++ lib.optionals withNetSnmp [
"--enable-snmp"
];
];
meta = with lib; {
homepage = "https://keepalived.org";