python310Packages.nftables: init from pkgs.nftables, reduce with lib; usage over enitre file

main
Sandro Jäckel 2 years ago
parent 9b310a73db
commit d9da7087c0
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
  1. 16
      pkgs/os-specific/linux/nftables/default.nix
  2. 5
      pkgs/top-level/python-packages.nix

@ -8,8 +8,6 @@
, withXtables ? true , iptables
}:
with lib;
stdenv.mkDerivation rec {
version = "1.0.2";
pname = "nftables";
@ -28,8 +26,8 @@ stdenv.mkDerivation rec {
buildInputs = [
libmnl libnftnl libpcap
gmp jansson libedit
] ++ optional withXtables iptables
++ optional withPython python3;
] ++ lib.optional withXtables iptables
++ lib.optional withPython python3;
preConfigure = ''
substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file
@ -46,12 +44,12 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-json"
"--with-cli=editline"
] ++ optional (!withDebugSymbols) "--disable-debug"
++ optional (!withPython) "--disable-python"
++ optional withPython "--enable-python"
++ optional withXtables "--with-xtables";
] ++ lib.optional (!withDebugSymbols) "--disable-debug"
++ lib.optional (!withPython) "--disable-python"
++ lib.optional withPython "--enable-python"
++ lib.optional withXtables "--with-xtables";
meta = {
meta = with lib; {
description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework";
homepage = "https://netfilter.org/projects/nftables/";
license = licenses.gpl2Only;

@ -5595,6 +5595,11 @@ in {
nextcord = callPackage ../development/python-modules/nextcord { };
nftables = toPythonModule (pkgs.nftables.override {
python3 = python;
withPython = true;
});
nghttp2 = (toPythonModule (pkgs.nghttp2.override {
inherit (self) python cython setuptools;
inherit (pkgs) ncurses;

Loading…
Cancel
Save