biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / security / sx-go / default.nix
blob8c8ceee0fe747aa693dd8f7811fb25f81fdf1bed
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , fetchpatch
5 , libpcap
6 }:
8 buildGoModule rec {
9   pname = "sx-go";
10   version = "0.5.0";
12   src = fetchFromGitHub {
13     owner = "v-byte-cpu";
14     repo = "sx";
15     rev = "v${version}";
16     sha256 = "sha256-HTIzA1QOVn3V/hGUu7wLIYUNYmcJ/FXi2yr6BGRizZA=";
17   };
19   vendorHash = "sha256-TWRMNt6x8zuvhP1nz4R6IVCX+9HityvVpzxRhDiMyO4=";
21   patches = [
22     # Fix darwin builds: https://github.com/v-byte-cpu/sx/pull/120
23     (fetchpatch {
24       name = "non-linux-method-signature.patch";
25       url = "https://github.com/v-byte-cpu/sx/commit/56457bfaa49eb6fbb7a33d7092d9c636b9c85895.patch";
26       hash = "sha256-0lCu3tZ0fEiC7qWfk1APLVwwrK9eovbVa/yG7OuXEWQ=";
27     })
28   ];
30   buildInputs = [
31     libpcap
32   ];
34   postFixup = ''
35     # Rename binary to avoid conflict with sx
36     mv $out/bin/sx $out/bin/${pname}
37   '';
39   meta = with lib; {
40     description = "Command-line network scanner";
41     homepage = "https://github.com/v-byte-cpu/sx";
42     license = licenses.mit;
43     maintainers = with maintainers; [ fab ];
44     mainProgram = "sx-go";
45   };