about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/opensnitch/daemon.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/opensnitch/daemon.nix')
-rw-r--r--nixpkgs/pkgs/tools/networking/opensnitch/daemon.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/tools/networking/opensnitch/daemon.nix b/nixpkgs/pkgs/tools/networking/opensnitch/daemon.nix
index 9930f1f1fe52..3390776a17ae 100644
--- a/nixpkgs/pkgs/tools/networking/opensnitch/daemon.nix
+++ b/nixpkgs/pkgs/tools/networking/opensnitch/daemon.nix
@@ -11,6 +11,8 @@
 , iptables
 , makeWrapper
 , protoc-gen-go-grpc
+, testers
+, opensnitch
 }:
 
 buildGoModule rec {
@@ -40,9 +42,14 @@ buildGoModule rec {
 
   nativeBuildInputs = [ pkg-config protobuf go-protobuf makeWrapper protoc-gen-go-grpc ];
 
-  vendorSha256 = "sha256-81BKMLuEXA/NeIjO7icBm48ROq6KxAxHtvP0nV5yM5A=";
+  vendorSha256 = "sha256-jWP0oF+jZRFMi5Y2y0SARMoP8wTKVZ8UWra9JNzdSOw=";
 
   preBuild = ''
+    # Fix inconsistent vendoring build error
+    # https://github.com/evilsocket/opensnitch/issues/770
+    cp ${./go.mod} go.mod
+    cp ${./go.sum} go.sum
+
     make -C ../proto ../daemon/ui/protocol/ui.pb.go
   '';
 
@@ -65,11 +72,16 @@ buildGoModule rec {
       --prefix PATH : ${lib.makeBinPath [ iptables ]}
   '';
 
+  passthru.tests.version = testers.testVersion {
+    package = opensnitch;
+    command = "opensnitchd -version";
+  };
+
   meta = with lib; {
     description = "An application firewall";
     homepage = "https://github.com/evilsocket/opensnitch/wiki";
     license = licenses.gpl3Only;
-    maintainers = [ maintainers.raboof ];
+    maintainers = with maintainers; [ onny ];
     platforms = platforms.linux;
   };
 }