depot/third_party/nixpkgs/pkgs/tools/networking/termshark/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

36 lines
905 B
Nix

{ lib, fetchFromGitHub, makeWrapper, buildGoModule, wireshark-cli }:
buildGoModule rec {
pname = "termshark";
version = "2.4.0";
src = fetchFromGitHub {
owner = "gcla";
repo = "termshark";
rev = "v${version}";
sha256 = "sha256-qq7BDGprRkWKRMJiVnqPeTwtHd3tea9dPE8RIPL2YVI=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ wireshark-cli ];
vendorHash = "sha256-C9XOiNjo+TZ+erdnypRhhfpbuBhB3yEqNpbtwjEv14g=";
doCheck = false;
postFixup = ''
wrapProgram $out/bin/termshark --prefix PATH : ${lib.makeBinPath [ wireshark-cli ]}
'';
ldflags = [
"-X github.com/gcla/termshark.Version=${version}"
];
meta = with lib; {
homepage = "https://termshark.io/";
description = "Terminal UI for wireshark-cli, inspired by Wireshark";
mainProgram = "termshark";
license = licenses.mit;
maintainers = with maintainers; [ winpat ];
};
}