2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, makeWrapper, buildGoModule, wireshark-cli }:
|
2019-05-07 16:26:10 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "termshark";
|
2022-07-31 04:14:50 +01:00
|
|
|
version = "2.4.0";
|
2019-05-07 16:26:10 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gcla";
|
|
|
|
repo = "termshark";
|
|
|
|
rev = "v${version}";
|
2022-07-31 04:14:50 +01:00
|
|
|
sha256 = "sha256-qq7BDGprRkWKRMJiVnqPeTwtHd3tea9dPE8RIPL2YVI=";
|
2019-05-07 16:26:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-03-27 07:33:21 +00:00
|
|
|
buildInputs = [ wireshark-cli ];
|
2019-05-07 16:26:10 +01:00
|
|
|
|
2022-07-31 04:14:50 +01:00
|
|
|
vendorSha256 = "sha256-C9XOiNjo+TZ+erdnypRhhfpbuBhB3yEqNpbtwjEv14g=";
|
2019-05-07 16:26:10 +01:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2019-05-07 16:26:10 +01:00
|
|
|
postFixup = ''
|
2021-01-15 09:19:50 +00:00
|
|
|
wrapProgram $out/bin/termshark --prefix PATH : ${lib.makeBinPath [ wireshark-cli ]}
|
2019-05-07 16:26:10 +01:00
|
|
|
'';
|
|
|
|
|
2021-08-26 07:45:51 +01:00
|
|
|
ldflags = [
|
|
|
|
"-X github.com/gcla/termshark.Version=${version}"
|
|
|
|
];
|
2019-05-07 16:26:10 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://termshark.io/";
|
2019-05-07 16:26:10 +01:00
|
|
|
description = "A terminal UI for wireshark-cli, inspired by Wireshark";
|
|
|
|
license = licenses.mit;
|
2022-07-04 11:41:44 +01:00
|
|
|
maintainers = with maintainers; [ winpat ];
|
2019-05-07 16:26:10 +01:00
|
|
|
};
|
2020-07-31 04:58:04 +01:00
|
|
|
}
|