2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
nixosTests,
|
|
|
|
autoreconfHook,
|
|
|
|
pkg-config,
|
|
|
|
libnl,
|
|
|
|
iptables,
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
sourceAttrs = (import ./source.nix) { inherit fetchFromGitHub; };
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2022-01-25 03:21:06 +00:00
|
|
|
pname = "jool-cli";
|
|
|
|
version = sourceAttrs.version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = sourceAttrs.src;
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
patches = [ ./validate-config.patch ];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
libnl
|
|
|
|
iptables
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
makeFlags = [
|
|
|
|
"-C"
|
|
|
|
"src/usr"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -e 's%^XTABLES_SO_DIR = .*%XTABLES_SO_DIR = '"$out"'/lib/xtables%g' -i src/usr/iptables/Makefile
|
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) jool;
|
|
|
|
};
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.jool.mx/";
|
|
|
|
description = "Fairly compliant SIIT and Stateful NAT64 for Linux - CLI tools";
|
2024-07-27 06:49:29 +00:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.gpl2Only;
|
|
|
|
maintainers = with lib.maintainers; [ fpletz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|