nixpkgs/pkgs/tools/networking/termshark/default.nix

37 lines
907 B
Nix
Raw Normal View History

{ lib, fetchFromGitHub, makeWrapper, buildGoModule, wireshark-cli }:
2019-05-07 16:26:10 +01:00
buildGoModule rec {
pname = "termshark";
2021-02-06 21:21:22 +00:00
version = "2.2.0";
2019-05-07 16:26:10 +01:00
src = fetchFromGitHub {
owner = "gcla";
repo = "termshark";
rev = "v${version}";
2021-02-06 21:21:22 +00:00
sha256 = "sha256-vS6j8Mcri3SI/6HqtFX/EzVl8S0lx8fWU+0ddjzJz8g=";
2019-05-07 16:26:10 +01:00
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ wireshark-cli ];
2019-05-07 16:26:10 +01:00
2021-02-06 21:21:22 +00:00
vendorSha256 = "sha256-md9HHiYOsBimCBjD1FyjTqnskCZksQiEggWd5UW0RPM=";
2019-05-07 16:26:10 +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
'';
buildFlagsArray = ''
-ldflags=
-X github.com/gcla/termshark.Version=${version}
'';
meta = with lib; {
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
};
}