3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/security/sx-go/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1 KiB
Nix
Raw Normal View History

{ stdenv
, lib
2021-08-23 20:05:14 +01:00
, buildGoModule
, fetchFromGitHub
2022-09-17 04:00:08 +01:00
, fetchpatch
2021-08-23 20:05:14 +01:00
, libpcap
}:
buildGoModule rec {
pname = "sx-go";
2022-09-05 04:37:03 +01:00
version = "0.5.0";
2021-08-23 20:05:14 +01:00
src = fetchFromGitHub {
owner = "v-byte-cpu";
repo = "sx";
rev = "v${version}";
2022-09-05 04:37:03 +01:00
sha256 = "sha256-HTIzA1QOVn3V/hGUu7wLIYUNYmcJ/FXi2yr6BGRizZA=";
2021-08-23 20:05:14 +01:00
};
2022-09-05 04:37:03 +01:00
vendorSha256 = "sha256-TWRMNt6x8zuvhP1nz4R6IVCX+9HityvVpzxRhDiMyO4=";
2021-08-23 20:05:14 +01:00
2022-09-17 04:00:08 +01:00
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=";
})
];
2021-08-23 20:05:14 +01:00
buildInputs = [
libpcap
];
postFixup = ''
# Rename binary to avoid conflict with sx
mv $out/bin/sx $out/bin/${pname}
'';
meta = with lib; {
description = "Command-line network scanner";
homepage = "https://github.com/v-byte-cpu/sx";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}