summary refs log tree commit diff
path: root/pkgs/tools/security/sx-go
diff options
context:
space:
mode:
authorStanisław Pitucha <git@viraptor.info>2022-09-17 13:00:08 +1000
committerStanisław Pitucha <stan.pitucha@envato.com>2022-09-17 13:00:41 +1000
commit4d6eb52bb70277b4fc0e37088c0e7f61b99e2a26 (patch)
treee3f0ea485784c7c61974fe10fe1d8b7441ad8a13 /pkgs/tools/security/sx-go
parenta30eeb16a07262f57fc51aa64f1012d7f6aa6db0 (diff)
sx-go: fix darwin build
Diffstat (limited to 'pkgs/tools/security/sx-go')
-rw-r--r--pkgs/tools/security/sx-go/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/tools/security/sx-go/default.nix b/pkgs/tools/security/sx-go/default.nix
index 76ed8a7d55c13..626851b1824fd 100644
--- a/pkgs/tools/security/sx-go/default.nix
+++ b/pkgs/tools/security/sx-go/default.nix
@@ -2,6 +2,7 @@
 , lib
 , buildGoModule
 , fetchFromGitHub
+, fetchpatch
 , libpcap
 }:
 
@@ -18,6 +19,16 @@ buildGoModule rec {
 
   vendorSha256 = "sha256-TWRMNt6x8zuvhP1nz4R6IVCX+9HityvVpzxRhDiMyO4=";
 
+  patches = [
+    # Fix darwin builds:
+    #   https://github.com/v-byte-cpu/sx/pull/120
+    (fetchpatch {
+      name = "non-linux-method-signature.patch";
+      url = "https://github.com/v-byte-cpu/sx/commit/56457bfaa49eb6fbb7a33d7092d9c636b9c85895.patch";
+      hash = "sha256-0lCu3tZ0fEiC7qWfk1APLVwwrK9eovbVa/yG7OuXEWQ=";
+    })
+  ];
+
   buildInputs = [
     libpcap
   ];
@@ -28,7 +39,6 @@ buildGoModule rec {
   '';
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
     description = "Command-line network scanner";
     homepage = "https://github.com/v-byte-cpu/sx";
     license = licenses.mit;