nftables: remove python patch

Replaced the patch with `--replace-fail` based on @quentinmit and
@Izorkin recommendation.
This commit is contained in:
Leorize 2024-04-04 14:48:22 -05:00
parent e95a228693
commit 9b8156b4a4
No known key found for this signature in database
GPG Key ID: EF09488EEE4CE244
2 changed files with 1 additions and 16 deletions

View File

@ -1,13 +0,0 @@
diff --git a/py/src/nftables.py b/py/src/nftables.py
index f1e43ade..9adcd1be 100644
--- a/py/src/nftables.py
+++ b/py/src/nftables.py
@@ -69,7 +69,7 @@ class Nftables:
validator = None
- def __init__(self, sofile="libnftables.so.1"):
+ def __init__(self, sofile="@out@/lib/libnftables.so.1"):
"""Instantiate a new Nftables class object.
Accepts a shared object file to open, by default standard search path

View File

@ -9,11 +9,9 @@ buildPythonPackage {
inherit (nftables) version src;
pyproject = true;
patches = [ ./fix-py-libnftables.patch ];
postPatch = ''
substituteInPlace "py/src/nftables.py" \
--subst-var-by "out" "${nftables}"
--replace-fail "libnftables.so.1" "${nftables}/lib/libnftables.so.1"
'';
setSourceRoot = "sourceRoot=$(echo */py)";