2024-02-29 20:09:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nixosTests
|
|
|
|
, file
|
|
|
|
, libmnl
|
|
|
|
, libnftnl
|
|
|
|
, libnl
|
|
|
|
, net-snmp
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, autoreconfHook
|
|
|
|
, withNetSnmp ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "keepalived";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "2.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "acassen";
|
|
|
|
repo = "keepalived";
|
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
sha256 = "sha256-/fO1Lx+QRW42dJ+tkaRNd7y/91YM+1PO/aKC/lXpt1c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-10-09 14:59:57 +00:00
|
|
|
file
|
|
|
|
libmnl
|
|
|
|
libnftnl
|
2020-04-24 23:36:52 +00:00
|
|
|
libnl
|
|
|
|
openssl
|
2024-02-29 20:09:43 +00:00
|
|
|
] ++ lib.optionals withNetSnmp [
|
|
|
|
net-snmp
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-10-09 14:59:57 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
passthru.tests.keepalived = nixosTests.keepalived;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-sha1"
|
2024-02-29 20:09:43 +00:00
|
|
|
] ++ lib.optionals withNetSnmp [
|
2020-04-24 23:36:52 +00:00
|
|
|
"--enable-snmp"
|
2024-02-29 20:09:43 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://keepalived.org";
|
|
|
|
description = "Routing software written in C";
|
2021-10-09 14:59:57 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2024-01-25 14:12:00 +00:00
|
|
|
maintainers = [ maintainers.raitobezarius ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|