nixpkgs-suyu/pkgs/os-specific/linux/nftables/fix-py-libnftables.patch
Leorize c7c8da035d
nftables: fix python module lookup for libnftables
The default parameter for Nftables class relies on Python looking via
default search path, which will not work with Nix.

This commit hardcode the path into the module to handle software using
this default parameter (eg. firewalld).
2023-11-24 01:35:38 +01:00

13 lines
443 B
Diff

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