9 pname = "protoc-gen-es";
12 src = fetchFromGitHub {
15 rev = "refs/tags/v${version}";
16 hash = "sha256-yeGPtSfxq9bNhWgLEbt6lT7B1CNEgJS0E9hxwHa/Lfw=";
19 ${lib.getExe npm-lockfile-fix} $out/package-lock.json
23 npmDepsHash = "sha256-2PcpDF5ohPu92TkMjg2NyXAvPt+yZuAtLHYkGuE7TRo=";
25 npmWorkspace = "packages/protoc-gen-es";
28 npm run --workspace=packages/protobuf build
29 npm run --workspace=packages/protoplugin build
32 # copy npm workspace modules while properly resolving symlinks
33 # TODO: workaround can be removed once this is merged: https://github.com/NixOS/nixpkgs/pull/333759
35 rm -rf $out/lib/node_modules/protobuf-es/node_modules/@bufbuild
36 cp -rL node_modules/@bufbuild $out/lib/node_modules/protobuf-es/node_modules/
39 passthru.updateScript = ./update.sh;
42 description = "Protobuf plugin for generating ECMAScript code";
43 homepage = "https://github.com/bufbuild/protobuf-es";
44 changelog = "https://github.com/bufbuild/protobuf-es/releases/tag/v${version}";
45 license = licenses.asl20;
46 maintainers = with maintainers; [