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