depot/third_party/nixpkgs/pkgs/by-name/pr/protoc-gen-rust/package.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

30 lines
700 B
Nix

{ fetchCrate
, lib
, rustPlatform
, protobuf
}:
rustPlatform.buildRustPackage rec {
pname = "protoc-gen-rust";
version = "3.2.0";
src = fetchCrate {
inherit version;
pname = "protobuf-codegen";
sha256 = "sha256-9Rf7GI/qxoqlISD169TJwUVAdJn8TpxTXDNxiQra2UY=";
};
cargoSha256 = "sha256-i1ZIEbU6tw7xA1w+ffD/h1HIkOwVep9wQJys9Bydvv0=";
cargoBuildFlags = ["--bin" pname];
nativeBuildInputs = [ protobuf ];
meta = with lib; {
description = "Protobuf plugin for generating Rust code";
mainProgram = "protoc-gen-rust";
homepage = "https://github.com/stepancheg/rust-protobuf";
license = licenses.mit;
maintainers = with maintainers; [ lucperkins ];
};
}