Last active
May 18, 2023 09:38
-
-
Save haruue/54a523e50810c69915f78972c9b3c9e9 to your computer and use it in GitHub Desktop.
Nix packages for xtables-addons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, lib, linuxPackages, kernel ? linuxPackages.kernel, kmod }: | |
let | |
kbuilddir = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; | |
in | |
stdenv.mkDerivation rec { | |
name = "xtables-addons-kmod-${version}-${kernel.version}"; | |
version = "3.24"; | |
src = fetchTarball { | |
url = "https://inai.de/files/xtables-addons/xtables-addons-${version}.tar.xz"; | |
}; | |
hardeningDisable = [ "pic" ]; | |
nativeBuildInputs = kernel.moduleBuildDependencies; | |
configurePhase = "true"; | |
buildPhase = '' | |
make -j$(nproc) -C ${kbuilddir} M=$PWD/extensions XA_ABSTOPSRCDIR=$PWD modules | |
''; | |
installPhase = '' | |
mkdir $out | |
make -C ${kbuilddir} M=$PWD/extensions XA_ABSTOPSRCDIR=$PWD INSTALL_MOD_PATH=$out modules_install | |
''; | |
meta = with lib; { | |
description = "Additional extensions for Xtables packet filter (kernel module)"; | |
homepage = "https://inai.de/projects/xtables-addons/"; | |
license = licenses.gpl2; | |
platforms = platforms.linux; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, lib, iptables, pkgconfig }: | |
stdenv.mkDerivation rec { | |
pname = "xtables-addons-usermod"; | |
version = "3.24"; | |
libraries = [ | |
iptables | |
pkgconfig | |
]; | |
buildInputs = libraries; | |
src = fetchTarball { | |
url = "https://inai.de/files/xtables-addons/xtables-addons-${version}.tar.xz"; | |
}; | |
configureFlags = [ | |
"--with-xtlibdir=$(out)/lib/xtables" | |
"--without-kbuild" | |
]; | |
enableParallelBuilding = true; | |
meta = with lib; { | |
description = "Additional extensions for Xtables packet filter (userspace libraries)"; | |
homepage = "https://inai.de/projects/xtables-addons/"; | |
license = licenses.gpl2; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment