diff options
author | Hanketsu <hanketsu@egregore.fun> | 2025-02-01 00:34:49 +0100 |
---|---|---|
committer | Hanketsu <hanketsu@egregore.fun> | 2025-06-13 00:04:26 +0200 |
commit | 7a47cac27c04e8bdbb7303dc295282686dba7613 (patch) | |
tree | 2c51098be91ef4738febc373c3c380df95fc3899 /battering | |
parent | 85064cd6d142fb5da58af7fa621831aec5b07948 (diff) |
battering: Add go-github-com-evilsocket-opensnitch-daemon.
* battering/packages/opensnitch.scm (go-github-com-evilsocket-opensnitch-daemon): New variable.
Diffstat (limited to 'battering')
-rw-r--r-- | battering/packages/opensnitch.scm | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/battering/packages/opensnitch.scm b/battering/packages/opensnitch.scm index f607d14..97744fe 100644 --- a/battering/packages/opensnitch.scm +++ b/battering/packages/opensnitch.scm @@ -137,3 +137,64 @@ (description "This package provides an additional module that allows Opensnitch to monitor traffic via eBPF rules.") (license license:gpl3+))) + +(define-public go-github-com-evilsocket-opensnitch-daemon + (package + (name "go-github-com-evilsocket-opensnitch-daemon") + (version "1.6.7") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/evilsocket/opensnitch/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0990hdc3vn50axyz21v11gwkc2svlwf9wlnf03lwxgnm2q4ha76q")))) + (build-system go-build-system) + (arguments + (list + #:go go-1.23 + #:import-path "github.com/evilsocket/opensnitch/daemon" + #:unpack-path "github.com/evilsocket/opensnitch" + #:tests? #f + #:phases #~(modify-phases %standard-phases + (add-before 'build 'make-proto-definitions + (lambda* (#:key unpack-path #:allow-other-keys) + (with-directory-excursion (format #f "src/~a/proto/" unpack-path) + (invoke "make" "../daemon/ui/protocol/ui.pb.go")))) + (add-before 'build 'replace-ebpf-path + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (format #f "src/~a/" import-path) + (substitute* "core/ebpf.go" + (("/usr") + #$opensnitch-ebpf-module) + (("modulesDir = .*$") + "modulesDir = \"\"\n"))))) + (add-before 'check 'delete-buggy-test-data + (lambda* (#:key tests? import-path #:allow-other-keys) + (when tests? + (delete-file + (string-append + "src/" import-path "/ui/testdata/default-config.json")))))))) + (inputs (list go-google-golang-org-grpc + go-golang-org-x-sys + go-golang-org-x-net + go-github-com-vishvananda-netns + go-github-com-vishvananda-netlink + go-github-com-varlink-go + go-github-com-iovisor-gobpf + go-github-com-google-uuid + go-github-com-google-nftables + go-github-com-google-gopacket + go-github-com-golang-protobuf + go-github-com-fsnotify-fsnotify + libnetfilter-queue + libnfnetlink + opensnitch-ebpf-module)) + (native-inputs (list protobuf protoc-gen-go + go-google-golang-org-grpc-cmd-protoc-gen-go-grpc + pkg-config)) + (home-page "https://github.com/evilsocket/opensnitch") + (synopsis "GNU/Linux application firewall.") + (description "OpenSnitch is an interactive GNU/Linux application firewall inspired by Little Snitch.") + (license license:gpl3))) |