2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub, makeWrapper, buildGoModule, wireshark-cli }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "termshark";
|
|
|
|
version = "2.1.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gcla";
|
|
|
|
repo = "termshark";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "14h548apg3zvjvq6yy22hpw2ziy5vmwyr04vv59ls1mjg4qf2v8b";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ wireshark-cli ];
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
vendorSha256 = "14apff3vcbndr30765lzi4qswakavb4396bjixxvpxv6i5c04dq7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = ''
|
2021-01-15 22:18:51 +00:00
|
|
|
wrapProgram $out/bin/termshark --prefix PATH : ${lib.makeBinPath [ wireshark-cli ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X github.com/gcla/termshark.Version=${version}
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://termshark.io/";
|
|
|
|
description = "A terminal UI for wireshark-cli, inspired by Wireshark";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ winpat elseym ];
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|