-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a buildPnpmPackage
? Or add pnpm build and install hooks?
#317927
Comments
I'm not as aware about the technical side of this as you guys, but here's what I think: In nixpkgs, we have all sorts of helper functions specific to languages. We also have one specific to tooling, Since |
buildPnmpPackage
? Or add pnpm build and install hooks?buildPnpmPackage
? Or add pnpm build and install hooks?
I think the steps required to build a pnpm-based package are already convoluted enough to warrant a wrapper 😁 We can certainly expose those hooks for packages that need more fine-grained control, but we should have an equivalent of |
i don't think anything speaks against having a buildPnpmPackage function as long as the hooks are also usable in more complex scenarios outside of buildPnpmPackage (just like with the current hooks for npm) also maybe |
buildPackage, mkPackage, it doesn't really matter honestly, but it does have to be under pnpm_{8,9} since the hooks all depend on that (breaking lockfile changes and what not) |
Here are my thoughts on adding another builder, |
And for people who don't want to use the builder and want to fetch deps what if you introduce |
Also a hook would be much better as adding a builder doesn't give you the modifications from buildNpmPackage or something an example is at #335751 |
The best solution would probably be to have both hooks and a builder function that uses them -- |
Continuing from:
pnpm-lock.yaml
#231513Which was fixed by:
This issue is dedicated to discussing whether we want a
buildPnpmPackage
nix function to be defined, or perhaps we want to havepnpm.buildHook
andpnpm.installHook
defined (along withpnpm.configHook
which was added in #290715 ).Currently, it seems that
npmHooks.npmBuildHook
andnpmHooks.npmInstallHook
which do a similar job, only they usenpm run build
and notpnpm run build
. If eventually we'll decide we don't need new hooks forpnpm
, we should at least document thatnpmHooks
are a good alternative.There are some issues with
pnpm deploy
as mentioned by @NyCodeGHG in #231513 (comment) , so this should be taken in mind.Another detail worth mentioning, is that for
bash-language-server
, which uses pnpm workspaces, the docs are slightly in contrast to what works for that package, see #333701 (comment) .ccing other people involved: @Lord-Valen @dhess @teto .
The text was updated successfully, but these errors were encountered: