Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
72 lines
1.4 KiB
Nix
72 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
perl,
|
|
perlPackages,
|
|
tayga,
|
|
iproute2,
|
|
nftables,
|
|
systemd,
|
|
nixosTests,
|
|
}:
|
|
|
|
assert (lib.assertMsg systemd.withNetworkd "systemd for clatd must be built with networkd support");
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "clatd";
|
|
version = "2.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "toreanderson";
|
|
repo = "clatd";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-hNFuS6pdaA/FTIUeuwjGovlHcPh248Au1VXCzMuYwLU=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
perl # for pod2man
|
|
];
|
|
|
|
buildInputs = with perlPackages; [
|
|
perl
|
|
NetIP
|
|
NetDNS
|
|
JSON
|
|
];
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
preBuild = ''
|
|
mkdir -p $out/{sbin,share/man/man8}
|
|
'';
|
|
|
|
postFixup = ''
|
|
patchShebangs $out/bin/clatd
|
|
wrapProgram $out/bin/clatd \
|
|
--set PERL5LIB $PERL5LIB \
|
|
--prefix PATH : ${
|
|
lib.makeBinPath [
|
|
tayga # tayga
|
|
iproute2 # ip
|
|
nftables # nft
|
|
systemd # networkctl
|
|
]
|
|
}
|
|
'';
|
|
|
|
passthru.tests.clatd = nixosTests.clatd;
|
|
|
|
meta = with lib; {
|
|
description = "464XLAT CLAT implementation for Linux";
|
|
homepage = "https://github.com/toreanderson/clatd";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jmbaur ];
|
|
mainProgram = "clatd";
|
|
platforms = platforms.linux;
|
|
};
|
|
})
|