protoc-gen-js: init at 3.21.2
This commit is contained in:
parent
32f27641a0
commit
067c1958fa
1 changed files with 37 additions and 0 deletions
37
pkgs/by-name/pr/protoc-gen-js/package.nix
Normal file
37
pkgs/by-name/pr/protoc-gen-js/package.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ stdenv, lib, buildBazelPackage, bazel_6, fetchFromGitHub, darwin }:
|
||||
|
||||
buildBazelPackage rec {
|
||||
pname = "protoc-gen-js";
|
||||
version = "3.21.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "protocolbuffers";
|
||||
repo = "protobuf-javascript";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-TmP6xftUVTD7yML7UEM/DB8bcsL5RFlKPyCpcboD86U=";
|
||||
};
|
||||
|
||||
bazel = bazel_6;
|
||||
bazelTargets = [ "generator:protoc-gen-js" ];
|
||||
bazelBuildFlags = lib.optionals stdenv.cc.isClang [ "--cxxopt=-x" "--cxxopt=c++" "--host_cxxopt=-x" "--host_cxxopt=c++" ];
|
||||
removeRulesCC = false;
|
||||
removeLocalConfigCC = false;
|
||||
|
||||
LIBTOOL = lib.optionalString stdenv.isDarwin "${darwin.cctools}/bin/libtool";
|
||||
|
||||
fetchAttrs.sha256 = "sha256-H0zTMCMFct09WdR/mzcs9FcC2OU/ZhGye7GAkx4tGa8=";
|
||||
|
||||
buildAttrs.installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -Dm755 bazel-bin/generator/protoc-gen-js $out/bin/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Protobuf plugin for generating JavaScript code";
|
||||
homepage = "https://github.com/protocolbuffers/protobuf-javascript";
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
license = with licenses; [ asl20 bsd3 ];
|
||||
sourceProvenance = [ sourceTypes.fromSource ];
|
||||
maintainers = with maintainers; [ Sorixelle ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue