aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanketsu <hanketsu@egregore.fun>2025-02-22 15:54:35 +0100
committerHanketsu <hanketsu@egregore.fun>2025-02-22 15:54:35 +0100
commita1a6a73c564aadd7b6e8725dba35e6b3a4222419 (patch)
tree066b2db886572cc6248b76697c160e09f7ace473
parentccdeedfe0bef9ee9d179249ea2dc8d60dfffb980 (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.
-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))