2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, buildGoModule, wireshark-cli }:
|
2019-05-07 16:26:10 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "termshark";
|
2020-02-24 12:16:30 +00:00
|
|
|
version = "2.1.1";
|
2019-05-07 16:26:10 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gcla";
|
|
|
|
repo = "termshark";
|
|
|
|
rev = "v${version}";
|
2020-02-24 12:16:30 +00:00
|
|
|
sha256 = "14h548apg3zvjvq6yy22hpw2ziy5vmwyr04vv59ls1mjg4qf2v8b";
|
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
|
|
|
|
2020-05-01 02:59:00 +01:00
|
|
|
vendorSha256 = "14apff3vcbndr30765lzi4qswakavb4396bjixxvpxv6i5c04dq7";
|
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 = ''
|
|
|
|
wrapProgram $out/bin/termshark --prefix PATH : ${stdenv.lib.makeBinPath [ wireshark-cli ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X github.com/gcla/termshark.Version=${version}
|
|
|
|
'';
|
|
|
|
|
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;
|
2020-02-24 12:16:30 +00:00
|
|
|
maintainers = with maintainers; [ winpat elseym ];
|
2019-05-07 16:26:10 +01:00
|
|
|
};
|
2020-07-31 04:58:04 +01:00
|
|
|
}
|