Sender | Message | Time |
---|---|---|
16 Apr 2025 | ||
12:32:58 | ||
hey folks, is there any doc or tool for integrating a pnpm project with nix? | 12:36:01 | |
please see https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/javascript.section.md#pnpm-javascript-pnpm | 14:22:52 | |
24 Apr 2025 | ||
14:46:51 | ||
19:29:10 | ||
25 Apr 2025 | ||
16:10:41 | ||
26 Apr 2025 | ||
Redacted or Malformed Event | 12:56:06 | |
27 Apr 2025 | ||
15:56:01 | ||
16:12:40 | ||
16:12:53 | ||
29 Apr 2025 | ||
10:08:02 | ||
Hey guys! Does anybody know how to create a package for a yarn project that uses pnp? I'm trying to package Verdaccio https://github.com/NixOS/nixpkgs/pull/398441 but it seems that | 10:09:26 | |
I'm not too familiar with yarn but PNP still has a yarn lockfile, correct? You could try to use the normal yarn deps fetcher on it. Regardless, the linked project's source, verdaccio, seems to use pnpm from cursory glance. This is iirc supported with a custom deps fetcher | 10:31:07 | |
(The pnpm guess is based on the pnpm lockfile, https://github.com/verdaccio/verdaccio/blob/master/pnpm-lock.yaml) | 10:33:24 | |
Pnpm has its own lock file and fetcher | 11:57:24 | |
(that is a pnpm lock file, or is pnp yet another package manager?) | 11:58:27 | |
yarn PNP is yarn plug-n-plug iirc, it's a special-ish way for yarn to handle deps. An alternative to traditional node_modules | 12:52:52 | |
https://yarnpkg.com/features/pnp | 12:53:41 | |
Though @c3n21:matrix.org, it might helpful if you could clarify if yarn PNP or pmpn was referred to here. | 12:55:39 | |
Yes it is yarn pnp, I should have mentioned that I'm packaging v6.1.2 which only uses yarn | 15:30:47 | |
Have you tried the yarn deps fetcher then? https://nixos.org/manual/nixpkgs/stable/#javascript-yarn If this project requires more elaborate packaging than `npm install` it is usually easier to put into it's own package instead of the `nodePackages` set. Following the nixpkgs manual for JavaScript projects should help you there. | 15:44:52 | |
The package does contain a yarn.lock for the requested tag so that might work out as a bypass for yarn PNP. | 15:48:13 | |
Yes I followed the docs, and it doesn't work because Funny enough, going the nodePackages at least allows me to build and run the package correctly, but it breaks the pipeline because generate script pulls in python for some reason | 15:52:41 | |
* Yes I followed the docs, and it doesn't work because Funny enough, going the nodePackages at least allows me to build and run the package correctly, but it breaks the pipeline because generate script pulls in | 15:53:04 | |
The yarn.lock in the Verdaccio 6.x branch is from a yarn berry install, i.e. yarn v3/v4. Support for yarn berry just got merged last week, only hit unstable today actually: https://github.com/NixOS/nixpkgs/pull/399404 See these docs: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/javascript.section.md#yarn-berry-v3v4-javascript-yarn-v3-v4 | 15:57:13 | |
My current attempt is already using fetchYarnBerryDeps, but it seems that with pnp it just doesn't work, I think I should report it in the PR | 16:30:06 | |
* My current attempt is already using fetchYarnBerryDeps, but it seems that with pnp it just doesn't work, do you think I should report it in the PR? | 16:30:14 | |
* My current attempt is already using fetchYarnBerryDeps (on my machine, not on the PR), but it seems that with pnp it just doesn't work, do you think I should report it in the PR? | 16:30:40 | |
* My current attempt is already using fetchYarnBerryDeps (on my machine, not on the PR), but it seems that with pnp it just doesn't work, do you think I should report it here https://github.com/NixOS/nixpkgs/pull/399404? | 16:31:12 | |
Hmm, the actual fetcher seems to work fine manually for me.
| 16:33:21 |