2024-08-17 22:29:43 +00:00
|
|
|
{ stdenv, lib, fetchurl, libpcap, nixosTests }:
|
2021-06-13 19:59:02 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ucarp";
|
|
|
|
version = "1.5.2";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.pureftpd.org/pub/ucarp/ucarp-${version}.tar.bz2";
|
|
|
|
sha256 = "0qidz5sr55nxlmnl8kcbjsrff2j97b44h9l1dmhvvjl46iji7q7j";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libpcap ];
|
|
|
|
|
2022-05-30 06:01:41 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: daemonize.o:/build/ucarp-1.5.2/src/ip_carp.h:73: multiple definition of
|
|
|
|
# `__packed'; ucarp.o:/build/ucarp-1.5.2/src/ip_carp.h:73: first defined here
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-05-30 06:01:41 +00:00
|
|
|
|
2024-08-17 22:29:43 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) ucarp; };
|
|
|
|
|
2021-06-13 19:59:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Userspace implementation of CARP";
|
|
|
|
longDescription = ''
|
|
|
|
UCARP allows a couple of hosts to share common virtual IP addresses in
|
|
|
|
order to provide automatic failover. It is a portable userland
|
|
|
|
implementation of the secure and patent-free Common Address Redundancy
|
|
|
|
Protocol (CARP, OpenBSD's alternative to the patents-bloated VRRP).
|
|
|
|
|
|
|
|
Warning: This package has not received any upstream updates for a long
|
|
|
|
time and can be considered as unmaintained.
|
|
|
|
'';
|
|
|
|
license = with licenses; [ isc bsdOriginal bsd2 gpl2Plus ];
|
|
|
|
maintainers = with maintainers; [ oxzi ];
|
2023-11-23 21:09:35 +00:00
|
|
|
mainProgram = "ucarp";
|
2021-06-13 19:59:02 +00:00
|
|
|
};
|
|
|
|
}
|