2020-03-27 07:33:21 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, protobuf }:
|
2019-07-01 04:50:51 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "prototool";
|
2020-05-20 15:50:43 +01:00
|
|
|
version = "1.10.0";
|
2019-07-01 04:50:51 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "uber";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-05-20 15:50:43 +01:00
|
|
|
sha256 = "02ih9pqnziwl2k4z6c59w1p4bxmb3xki5y33pdfkxqn2467s792g";
|
2019-07-01 04:50:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2020-05-20 15:50:43 +01:00
|
|
|
vendorSha256 = "0gyj0yrri2j4yxmyn4d4vdhaxf2p08srpjcxg9zpaxwv5rrvipav";
|
2019-07-01 04:50:51 +01:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2019-07-01 04:50:51 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/prototool" \
|
|
|
|
--prefix PROTOTOOL_PROTOC_BIN_PATH : "${protobuf}/bin/protoc" \
|
|
|
|
--prefix PROTOTOOL_PROTOC_WKT_PATH : "${protobuf}/include"
|
|
|
|
'';
|
|
|
|
|
|
|
|
subPackages = [ "cmd/prototool" ];
|
|
|
|
|
2020-03-27 07:33:21 +00:00
|
|
|
meta = with lib; {
|
2019-07-01 04:50:51 +01:00
|
|
|
homepage = "https://github.com/uber/prototool";
|
|
|
|
description = "Your Swiss Army Knife for Protocol Buffers";
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2020-05-20 15:50:43 +01:00
|
|
|
}
|