diff options
author | Hanketsu <hanketsu@egregore.fun> | 2025-02-01 00:34:13 +0100 |
---|---|---|
committer | Hanketsu <hanketsu@egregore.fun> | 2025-02-01 17:47:17 +0100 |
commit | 5c3d9bfe78eaaf6a18d39a008fbd27051b741fac (patch) | |
tree | 8543af152d57a0f1cd0de30e80b2151c562bbe2f | |
parent | 7049b89fc9b9a63b206f06ec9c9c9f34d3711674 (diff) |
battering: Add opensnitch-ebpf-module.
* battering/packages/opensnitch.scm (opensnitch-ebpf-module): New variable.
-rw-r--r-- | battering/packages/opensnitch.scm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/battering/packages/opensnitch.scm b/battering/packages/opensnitch.scm index bcad57a..f607d14 100644 --- a/battering/packages/opensnitch.scm +++ b/battering/packages/opensnitch.scm @@ -100,3 +100,40 @@ (begin (copy-recursively "." #$output)))))) ((#:allowed-references _) #f))))) + +(define-public opensnitch-ebpf-module + (package + (name "opensnitch-ebpf-module") + (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 gnu-build-system) + (inputs (list linux-libre linux-libre-headers)) + (native-inputs (list clang tar zstd flex bison)) + (arguments + (list + ;; TODO: make it buildable against any kernel? + #:make-flags #~(list (format #f "KERNEL_DIR=~a" #$linux-libre-headers-opensnitch)) + #:tests? #f + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "ebpf_prog/"))) + (delete 'configure) + (replace 'install + (lambda _ + (let ((lib (string-append #$output "/lib"))) + (install-file "opensnitch-dns.o" lib) + (install-file "opensnitch-procs.o" lib) + (install-file "opensnitch.o" lib))))))) + (home-page "https://github.com/evilsocket/opensnitch/") + (synopsis "eBPF module for Opensnitch") + (description "This package provides an additional module that allows +Opensnitch to monitor traffic via eBPF rules.") + (license license:gpl3+))) |