aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanketsu <hanketsu@egregore.fun>2025-02-01 00:32:08 +0100
committerHanketsu <hanketsu@egregore.fun>2025-02-01 17:47:17 +0100
commit44fa521416baee4e36563b434b0ad69388ad2005 (patch)
treed07661dfe537b02986897ebc368bd48b6d9100ba
parent373343a85584d3e9232d8739f5ac9e4141c6cf22 (diff)
battering: Add opensnitch.
* battering/packages/opensnitch.scm (opensnitch): New variable.
-rw-r--r--battering/packages/opensnitch.scm82
1 files changed, 82 insertions, 0 deletions
diff --git a/battering/packages/opensnitch.scm b/battering/packages/opensnitch.scm
new file mode 100644
index 0000000..d6dcf05
--- /dev/null
+++ b/battering/packages/opensnitch.scm
@@ -0,0 +1,82 @@
+(define-module (battering packages opensnitch)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module (guix gexp)
+ #:use-module (guix utils)
+ #:use-module (guix build-system go)
+ #:use-module (guix build-system python)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages algebra)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages elf)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages golang)
+ #:use-module (gnu packages golang-build)
+ #:use-module (gnu packages golang-web)
+ #:use-module (gnu packages golang-xyz)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages llvm)
+ #:use-module (gnu packages qt)
+ #:use-module (gnu packages rpc)
+ #:use-module (gnu packages tls)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages protobuf)
+ #:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-web)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (battering packages golang-xyz)
+ #:use-module (battering packages python-xyz)
+ #:use-module ((guix licenses)
+ #:prefix license:))
+
+(define-public opensnitch
+ (package
+ (name "opensnitch")
+ (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 python-build-system)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'make-proto-definitions
+ (lambda _
+ (with-directory-excursion "proto/"
+ (invoke "make" "../ui/opensnitch/ui_pb2.py"))))
+ (add-after 'make-proto-definitions 'chdir
+ (lambda _
+ (chdir "ui")))
+ (add-after 'chdir 'patch-setup.py
+ (lambda _
+ (substitute* "setup.py"
+ (("/usr/") ""))))
+ (add-after 'chdir 'generate-resources
+ (lambda _
+ ;; Patch resource script
+ (substitute* "i18n/generate_i18n.sh"
+ (("/bin/sh")
+ (which "sh")))
+ ;; Remove calls to pip in Makefile
+ (substitute* "Makefile"
+ (("@pip3.*$") ""))
+ (invoke "make" "opensnitch/resources_rc.py"))))))
+ (inputs (list python-grpcio-tools
+ python-pyinotify
+ python-slugify
+ python-pyqt
+ python-protobuf
+ python-notify2
+ python-qt-material))
+ (native-inputs (list python-setuptools qttools-5))
+ (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+)))