| 16 Jan 2025 |
| Hannes joined the room. | 01:28:40 |
Hannes | Hi, can someone tell what is the preferred way of packaging a Node.js CLI in nixpkgs? Should I add it to pkgs/development/node-packages/node-packages.json or use buildNpmPackage? | 02:14:21 |
emily | latter | 02:16:10 |
Hannes | Thanks, I'm glad because I tried the first method and it wasn't working 😅 | 02:16:47 |
Hannes | Okay, followup question, the package I'm building has an npm run build script, but it's just defined as npm run lint && npm run test, should I set dontNpmBuild = true so that nix doesn't lint and test the package every time it builds? | 02:39:45 |
Hannes | Here's the PR for the package if anyone has suggestions :) https://github.com/NixOS/nixpkgs/pull/374206 | 04:26:42 |
| 18 Jan 2025 |
| maralorn joined the room. | 14:55:16 |
maralorn | Hey there. I am trying to build https://github.com/gristlabs/grist-core bad sadly I have no clue what I am doing. | 14:57:06 |
maralorn | From perusing nixpkgs my take away was that the current best approach are yarn* hooks. | 14:57:50 |
maralorn | So I copied the element-call derivation which seems to be doing exactly that. | 14:58:12 |
maralorn | Now I get this error: | 14:58:26 |
maralorn |
grist-core> no configure script, doing nothing
grist-core> Executing yarnConfigHook
yarn config v1.22.22
success Set "yarn-offline-mirror" to "/nix/store/iswv7iddmhm8py46spivs75x2n53mjcf-offline".
Done in 0.02s.
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
error Can't make a request in offline mode ("https://registry.yarnpkg.com/https___registry.npmjs.org_jquery___jquery_3.5.0.tgz")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Can't make a request in offline mode ("https://registry.yarnpkg.com/node_gyp___node_gyp_8.4.1.tgz")
| 14:58:51 |
maralorn | * grist-core> no configure script, doing nothing
grist-core> Executing yarnConfigHook
yarn config v1.22.22
success Set "yarn-offline-mirror" to "/nix/store/iswv7iddmhm8py46spivs75x2n53mjcf-offline".
Done in 0.02s.
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
error Can't make a request in offline mode ("https://registry.yarnpkg.com/https___registry.npmjs.org_jquery___jquery_3.5.0.tgz")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Can't make a request in offline mode ("https://registry.yarnpkg.com/node_gyp___node_gyp_8.4.1.tgz")
| 14:59:03 |
maralorn | If there are any docs about how to do this properly please let me know. | 14:59:53 |
maralorn | The error looks surprisingliy like https://github.com/nix-community/yarn2nix/issues/111 | 15:12:27 |
maralorn | That url is pretty clearly wrong. | 15:12:44 |
| @sfkvso:matrix.org joined the room. | 19:16:59 |
@sfkvso:matrix.org | Hey, is there a recommended way to develop a npm/nodejs app now ? (node2nix and npmlock2nix seem unmaintained, and this post https://discourse.nixos.org/t/how-to-use-importnpmlock/53878/2 has no response) thank you all | 19:26:32 |
@sfkvso:matrix.org | ok buildNpmPackage seems to do the job | 20:21:01 |