diff options
Diffstat (limited to 'battering/packages')
-rw-r--r-- | battering/packages/opensnitch.scm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/battering/packages/opensnitch.scm b/battering/packages/opensnitch.scm index 97744fe..5b562d0 100644 --- a/battering/packages/opensnitch.scm +++ b/battering/packages/opensnitch.scm @@ -198,3 +198,30 @@ Opensnitch to monitor traffic via eBPF rules.") (synopsis "GNU/Linux application firewall.") (description "OpenSnitch is an interactive GNU/Linux application firewall inspired by Little Snitch.") (license license:gpl3))) + +(define-public opensnitchd + (package/inherit go-github-com-evilsocket-opensnitch-daemon + (name "opensnitchd") + (arguments + (substitute-keyword-arguments + (package-arguments go-github-com-evilsocket-opensnitch-daemon) + ((#:phases p) + #~(modify-phases #$p + (add-after 'install 'rename-daemon + (lambda _ + (rename-file + (string-append #$output "/bin/daemon") + (string-append #$output "/bin/opensnitchd")))) + (add-after 'install 'install-config-file + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (format #f "src/~a/" import-path) + (let ((etc (string-append #$output "/etc/"))) + (mkdir-p etc) + (copy-file "default-config.json" + (string-append etc "/default-config.json")) + (copy-file "system-fw.json" + (string-append etc "/system-fw.json")) + (substitute* (string-append etc "/default-config.json") + (("(Address.*)," all rest) rest) + (("^.*(LogFile|ProcMonitorMethod).*\n$") "")))))))) + ((#:install-source? _ #f) #f))))) |