2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
kernel,
|
|
|
|
nixosTests,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
sourceAttrs = (import ./source.nix) { inherit fetchFromGitHub; };
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "jool-${sourceAttrs.version}-${kernel.version}";
|
|
|
|
|
|
|
|
src = sourceAttrs.src;
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -e 's@/lib/modules/\$(.*)@${kernel.dev}/lib/modules/${kernel.modDirVersion}@' -i src/mod/*/Makefile
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
|
|
|
"-C src/mod"
|
|
|
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
installTargets = "modules_install";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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 - kernel modules";
|
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
|
|
|
};
|
|
|
|
}
|