Merge pull request #257499 from alaviss/nftables-py-fix

This commit is contained in:
Maciej Krüger 2023-11-25 06:38:10 +01:00 committed by GitHub
commit 1f8691c69f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -35,6 +35,13 @@ stdenv.mkDerivation rec {
python3.pkgs.setuptools
];
patches = [ ./fix-py-libnftables.patch ];
postPatch = ''
substituteInPlace "py/src/nftables.py" \
--subst-var-by "out" "$out"
'';
configureFlags = [
"--with-json"
(lib.withFeatureAs withCli "cli" "editline")

View File

@ -0,0 +1,13 @@
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