clatd: 1.6 -> 2.1.0

Removes iptables from clatd wrapper in favor of nftables used upstream.
Also adds systemd-networkd integration.
This commit is contained in:
Jared Baur 2025-03-17 13:51:17 -07:00
parent ded63f105c
commit ccae9bb5e8
No known key found for this signature in database

View file

@ -7,19 +7,21 @@
perlPackages, perlPackages,
tayga, tayga,
iproute2, iproute2,
iptables, nftables,
systemd,
nixosTests, nixosTests,
}: }:
stdenv.mkDerivation rec { assert (lib.assertMsg systemd.withNetworkd "systemd for clatd must be built with networkd support");
stdenv.mkDerivation (finalAttrs: {
pname = "clatd"; pname = "clatd";
version = "1.6"; version = "2.1.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "toreanderson"; owner = "toreanderson";
repo = "clatd"; repo = "clatd";
rev = "v${version}"; rev = "v${finalAttrs.version}";
hash = "sha256-ZUGWQTXXgATy539NQxkZSvQA7HIWkIPsw1NJrz0xKEg="; hash = "sha256-hNFuS6pdaA/FTIUeuwjGovlHcPh248Au1VXCzMuYwLU=";
}; };
strictDeps = true; strictDeps = true;
@ -33,6 +35,7 @@ stdenv.mkDerivation rec {
perl perl
NetIP NetIP
NetDNS NetDNS
JSON
]; ];
makeFlags = [ "PREFIX=$(out)" ]; makeFlags = [ "PREFIX=$(out)" ];
@ -47,9 +50,10 @@ stdenv.mkDerivation rec {
--set PERL5LIB $PERL5LIB \ --set PERL5LIB $PERL5LIB \
--prefix PATH : ${ --prefix PATH : ${
lib.makeBinPath [ lib.makeBinPath [
tayga tayga # tayga
iproute2 iproute2 # ip
iptables nftables # nft
systemd # networkctl
] ]
} }
''; '';
@ -64,4 +68,4 @@ stdenv.mkDerivation rec {
mainProgram = "clatd"; mainProgram = "clatd";
platforms = platforms.linux; platforms = platforms.linux;
}; };
} })