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

+12 -9
+7 -9
pkgs/os-specific/linux/nftables/default.nix
··· 8 , withXtables ? true , iptables 9 }: 10 11 - with lib; 12 - 13 stdenv.mkDerivation rec { 14 version = "1.0.2"; 15 pname = "nftables"; ··· 28 buildInputs = [ 29 libmnl libnftnl libpcap 30 gmp jansson libedit 31 - ] ++ optional withXtables iptables 32 - ++ optional withPython python3; 33 34 preConfigure = '' 35 substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file ··· 46 configureFlags = [ 47 "--with-json" 48 "--with-cli=editline" 49 - ] ++ optional (!withDebugSymbols) "--disable-debug" 50 - ++ optional (!withPython) "--disable-python" 51 - ++ optional withPython "--enable-python" 52 - ++ optional withXtables "--with-xtables"; 53 54 - meta = { 55 description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework"; 56 homepage = "https://netfilter.org/projects/nftables/"; 57 license = licenses.gpl2Only;
··· 8 , withXtables ? true , iptables 9 }: 10 11 stdenv.mkDerivation rec { 12 version = "1.0.2"; 13 pname = "nftables"; ··· 26 buildInputs = [ 27 libmnl libnftnl libpcap 28 gmp jansson libedit 29 + ] ++ lib.optional withXtables iptables 30 + ++ lib.optional withPython python3; 31 32 preConfigure = '' 33 substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file ··· 44 configureFlags = [ 45 "--with-json" 46 "--with-cli=editline" 47 + ] ++ lib.optional (!withDebugSymbols) "--disable-debug" 48 + ++ lib.optional (!withPython) "--disable-python" 49 + ++ lib.optional withPython "--enable-python" 50 + ++ lib.optional withXtables "--with-xtables"; 51 52 + meta = with lib; { 53 description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework"; 54 homepage = "https://netfilter.org/projects/nftables/"; 55 license = licenses.gpl2Only;
+5
pkgs/top-level/python-packages.nix
··· 5595 5596 nextcord = callPackage ../development/python-modules/nextcord { }; 5597 5598 nghttp2 = (toPythonModule (pkgs.nghttp2.override { 5599 inherit (self) python cython setuptools; 5600 inherit (pkgs) ncurses;
··· 5595 5596 nextcord = callPackage ../development/python-modules/nextcord { }; 5597 5598 + nftables = toPythonModule (pkgs.nftables.override { 5599 + python3 = python; 5600 + withPython = true; 5601 + }); 5602 + 5603 nghttp2 = (toPythonModule (pkgs.nghttp2.override { 5604 inherit (self) python cython setuptools; 5605 inherit (pkgs) ncurses;