Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently a monorepo with multiple components doesn't work with the current pnpm2nix.
You can try to build the entire monorepo, but then fail to copy out all of the
node_modules
directories or you can try and build individual components, but pnpm complains if you pass it the project-wide lockfile for a specific component.Add
workspace
andcomponents
as an alternative tosrc
. When building thenode-modules
derivation, copy out thenode_modules
directory for every named component in addition to thenode_modules
directory at the root.When building, pass the list of components as a filter to
pnpm run --recursive ${script}
. When doing the install, allow the user to specify which directories to copy out, with a default of${component}/dist
for each component.Currently doesn't have support for building individual components as separate derivations with shared
pnpm-store
andnode-modules
derivations.This works for building a project where we needed workspace support.