diff options
author | Nick Cao <nickcao@nichi.co> | 2023-12-30 11:12:25 -0500 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2023-12-30 11:12:25 -0500 |
commit | b04954bf143a2e5feb3937acd3a0886571d94d35 (patch) | |
tree | 90f188bf9f0cf6a6fbfe97a890763890d8cdd20e /pkgs/tools/networking/keepalived | |
parent | 2961883989ee0cf109342720e2123cd3f50043d1 (diff) |
keepalived: disable net-snmp support when cross compiling
net-snmp support requires running net-snmp-config which is not executable on build platform
Diffstat (limited to 'pkgs/tools/networking/keepalived')
-rw-r--r-- | pkgs/tools/networking/keepalived/default.nix | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/pkgs/tools/networking/keepalived/default.nix b/pkgs/tools/networking/keepalived/default.nix index 0b2371192d38c..c20722aa507ce 100644 --- a/pkgs/tools/networking/keepalived/default.nix +++ b/pkgs/tools/networking/keepalived/default.nix @@ -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"; |