| 15 Apr 2025 |
| @ayatsfer:matrix.org joined the room. | 06:37:16 |
@ayatsfer:matrix.org | Hi, just wanted to ask if there's any way to build a local pnpm project without having to pass the hash of the pnpm.fetchDeps | 06:38:27 |
@ayatsfer:matrix.org | this is possible with npm by using importNpmLock { npmRoot = ./.; }; | 06:38:44 |
@ayatsfer:matrix.org | maybe it can be done with some IFD... | 06:38:57 |
transcaffeine | meow, how do i deal with sqlite3 in fetchYarnDeps not adding the lib/bindings/node-*-$os-$arch/node_sqlite3.node to the offline yarn cache? | 18:38:08 |
| 16 Apr 2025 |
Winter | build it yourself: https://github.com/NixOS/nixpkgs/blob/2631b0b7abcea6e640ce31cd78ea58910d31e650/pkgs/by-name/th/thelounge/package.nix#L80 | 06:26:26 |
Winter | though it definitely should be added | 06:26:32 |
| lxsameer joined the room. | 12:32:58 |
lxsameer | hey folks, is there any doc or tool for integrating a pnpm project with nix? | 12:36:01 |
Sandro 🐧 | please see https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/javascript.section.md#pnpm-javascript-pnpm | 14:22:52 |
| 24 Apr 2025 |
| Cathal joined the room. | 14:46:51 |
| root joined the room. | 19:29:10 |
| 25 Apr 2025 |
| thirdofmay18081814goya joined the room. | 16:10:41 |
| 26 Apr 2025 |
aktaboot | Redacted or Malformed Event | 12:56:06 |
| 27 Apr 2025 |
| @adam_neverwas:matrix.org joined the room. | 15:56:01 |
| @arexon:matrix.org changed their profile picture. | 16:12:40 |
| @arexon:matrix.org changed their profile picture. | 16:12:53 |
| 29 Apr 2025 |
| c3n21 joined the room. | 10:08:02 |
c3n21 | 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 pnp is not supported by the current packaging tooling
| 10:09:26 |
Cobalt | 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 |
Cobalt | (The pnpm guess is based on the pnpm lockfile, https://github.com/verdaccio/verdaccio/blob/master/pnpm-lock.yaml) | 10:33:24 |
Sandro 🐧 | Pnpm has its own lock file and fetcher | 11:57:24 |
Sandro 🐧 | (that is a pnpm lock file, or is pnp yet another package manager?) | 11:58:27 |
Cobalt | 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 |
Cobalt | https://yarnpkg.com/features/pnp | 12:53:41 |
Cobalt | Though @c3n21:matrix.org, it might helpful if you could clarify if yarn PNP or pmpn was referred to here. | 12:55:39 |
c3n21 | Yes it is yarn pnp, I should have mentioned that I'm packaging v6.1.2 which only uses yarn | 15:30:47 |
Cobalt | 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 |
Cobalt | 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 |
c3n21 | Yes I followed the docs, and it doesn't work because fetchYarnDeps only supports yarn v1 (they have # yarn lockfile v1 as first line, which yarn berry doesn't have)
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 |