protoc-gen-es: fix missing node_modules directories

This workaround won't be needed anymore once #333759 is merged, which
fixes the node_modules copying behavior in npm-install-hooks.
This commit is contained in:
Felix Schröter 2024-09-05 18:19:44 +02:00
parent ce974f8107
commit f6f4fc200d
No known key found for this signature in database
GPG Key ID: 671E39E6744C807D

View File

@ -29,6 +29,13 @@ buildNpmPackage rec {
npm run --workspace=packages/protoplugin build
'';
# copy npm workspace modules while properly resolving symlinks
# TODO: workaround can be removed once this is merged: https://github.com/NixOS/nixpkgs/pull/333759
postInstall = ''
rm -rf $out/lib/node_modules/protobuf-es/node_modules/@bufbuild
cp -rL node_modules/@bufbuild $out/lib/node_modules/protobuf-es/node_modules/
'';
passthru.updateScript = ./update.sh;
meta = with lib; {