aboutsummaryrefslogtreecommitdiff
path: root/battering
diff options
context:
space:
mode:
authorHanketsu <hanketsu@egregore.fun>2025-02-22 15:54:35 +0100
committerHanketsu <hanketsu@egregore.fun>2025-06-13 00:04:30 +0200
commit7a62f46b22b3e2c47fe4863c5d884a15c9c635de (patch)
treecc869b12074be7b48de458446a68d2ef31c2d94a /battering
parentc4b342a43c8737f4b5f56aaa6f530d712f0ba08e (diff)
battering: Fix iptables on opensnitch daemon.
* battering/packages/opensnitch.scm (go-github-com-evilsocket-opensnitch-daemon) [arguments] Add new phase 'fix-iptables-path. [inputs] Add iptables to inputs.
Diffstat (limited to 'battering')
-rw-r--r--battering/packages/opensnitch.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/battering/packages/opensnitch.scm b/battering/packages/opensnitch.scm
index e7845cf..b2959a7 100644
--- a/battering/packages/opensnitch.scm
+++ b/battering/packages/opensnitch.scm
@@ -163,6 +163,12 @@ Opensnitch to monitor traffic via eBPF rules.")
#:unpack-path "github.com/evilsocket/opensnitch"
#:tests? #f
#:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-iptables-path
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path "/firewall/iptables")
+ (substitute* '("monitor.go" "iptables.go")
+ (("\"(iptables|ip6tables)\"," all iptables-executable)
+ (string-append "\"" #$iptables "/sbin/" iptables-executable "\","))))))
(add-before 'build 'make-proto-definitions
(lambda* (#:key unpack-path #:allow-other-keys)
(with-directory-excursion (format #f "src/~a/proto/" unpack-path)
@@ -186,7 +192,8 @@ Opensnitch to monitor traffic via eBPF rules.")
go-github-com-golang-protobuf
go-github-com-fsnotify-fsnotify
libnetfilter-queue
- libnfnetlink))
+ libnfnetlink
+ iptables))
(native-inputs (list protobuf protoc-gen-go
go-google-golang-org-grpc-cmd-protoc-gen-go-grpc
pkg-config))