2024-07-17 03:26:36 +00:00
|
|
|
{ buildPythonPackage
|
2023-12-22 19:53:29 +00:00
|
|
|
, setuptools
|
|
|
|
, nftables
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
pname = "nftables";
|
|
|
|
inherit (nftables) version src;
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-05-06 20:46:57 +00:00
|
|
|
substituteInPlace "src/nftables.py" \
|
2024-04-04 19:48:22 +00:00
|
|
|
--replace-fail "libnftables.so.1" "${nftables}/lib/libnftables.so.1"
|
2023-12-22 19:53:29 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
setSourceRoot = "sourceRoot=$(echo */py)";
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "nftables" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
inherit (nftables.meta) description homepage license platforms maintainers;
|
|
|
|
};
|
|
|
|
}
|