Merge pull request #183943 from lucperkins/lperkins/protoc-gen-rust

This commit is contained in:
Winter 2022-07-31 11:32:19 -04:00 committed by GitHub
commit 74a8fab4b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,29 @@
{ fetchCrate
, lib
, rustPlatform
, protobuf
}:
rustPlatform.buildRustPackage rec {
pname = "protoc-gen-rust";
version = "3.1.0";
src = fetchCrate {
inherit version;
pname = "protobuf-codegen";
sha256 = "sha256-DaydUuENqmN812BgQmpewRPhkq9lT6+g+VPuytLc25Y=";
};
cargoSha256 = "sha256-kzc2Wd+Y3mNmOHxRj5R1LIbvXz5NyGcRnz2e0jdfdPg=";
cargoBuildFlags = ["--bin" pname];
nativeBuildInputs = [ protobuf ];
meta = with lib; {
description = "Protobuf plugin for generating Rust code";
homepage = "https://github.com/stepancheg/rust-protobuf";
license = licenses.mit;
maintainers = with maintainers; [ lucperkins ];
};
}

View File

@ -482,6 +482,8 @@ with pkgs;
protoc-gen-connect-go = callPackage ../development/tools/protoc-gen-connect-go { };
protoc-gen-rust = callPackage ../development/tools/protoc-gen-rust { };
protoc-gen-twirp = callPackage ../development/tools/protoc-gen-twirp { };
protoc-gen-twirp_php = callPackage ../development/tools/protoc-gen-twirp_php { };