3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/prototool/default.nix

36 lines
977 B
Nix
Raw Normal View History

2020-03-21 10:55:00 +00:00
{ stdenv, buildGoModule, fetchFromGitHub, makeWrapper, protobuf, Security }:
2019-07-01 04:50:51 +01:00
buildGoModule rec {
pname = "prototool";
2019-10-16 11:50:06 +01:00
version = "1.9.0";
2019-07-01 04:50:51 +01:00
src = fetchFromGitHub {
owner = "uber";
repo = pname;
rev = "v${version}";
2019-10-16 11:50:06 +01:00
sha256 = "1ssgvhcnqffhhdx8hnk4lmklip2f6g9i7ifblywfjylb08y7iqgd";
2019-07-01 04:50:51 +01:00
};
nativeBuildInputs = [ makeWrapper ];
2020-03-21 10:55:00 +00:00
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
2019-10-16 11:50:06 +01:00
modSha256 = "1gc8kc9mbi3mlh48zx4lcgpsrf8z879f1qj9wfyr66s7wd1ljazg";
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-21 10:55:00 +00:00
meta = with stdenv.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;
};
}