2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel }:
|
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
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.jool.mx/";
|
|
|
|
description = "Fairly compliant SIIT and Stateful NAT64 for Linux - kernel modules";
|
|
|
|
platforms = platforms.linux;
|
2022-03-05 16:20:37 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
};
|
|
|
|
}
|