nixpkgs/pkgs/by-name/uc/ucarp/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
1.3 KiB
Nix

{ stdenv, lib, fetchurl, libpcap, nixosTests }:
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 ];
# 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
env.NIX_CFLAGS_COMPILE = "-fcommon";
passthru.tests = { inherit (nixosTests) ucarp; };
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 ];
mainProgram = "ucarp";
};
}