| 3 Jan 2024 |
Lily Foster | (at least they set an env var to ensure they don't accidentally recurisvely re-exec npm with no end, right?) | 13:46:39 |
Lily Foster | (ugh npm makes me sad) | 13:46:44 |
Lily Foster | (sorry for rant...) | 13:46:50 |
@janne.hess:helsinki-systems.de | In reply to @lily:lily.flowers (ugh npm makes me sad) try yarn, might make you sadder | 13:47:30 |
Lily Foster | In reply to @janne.hess:helsinki-systems.de try yarn, might make you sadder i doubt that tbh. sure it's missing some stuff we want for reproducibility, but at least it felt somewhat more intelligently designed | 13:48:04 |
@janne.hess:helsinki-systems.de | In reply to @lily:lily.flowers i doubt that tbh. sure it's missing some stuff we want for reproducibility, but at least it felt somewhat more intelligently designed
➤ 8;;https://yarnpkg.com/advanced/error-codes#yn0060---incompatible_peer_dependencyYN00608;;: │ vitest@npm:0.34.6 [f9b2d] provides @types/node (pe6001) with version 16.9.1, which doesn't satisfy what vite requests
| 13:48:19 |
Lily Foster | and their solution to lockfile reproducibility involves actually sane locking that doesn't produce megabytes large dep trees | 13:48:26 |
@janne.hess:helsinki-systems.de | In reply to @janne.hess:helsinki-systems.de
➤ 8;;https://yarnpkg.com/advanced/error-codes#yn0060---incompatible_peer_dependencyYN00608;;: │ vitest@npm:0.34.6 [f9b2d] provides @types/node (pe6001) with version 16.9.1, which doesn't satisfy what vite requests
(not an error btw because I ran yarn dedupe first) | 13:48:49 |
Lily Foster | (now if only their lockfile format was sane....) | 13:48:53 |
@janne.hess:helsinki-systems.de | In reply to @lily:lily.flowers (now if only their lockfile format was sane....) it is with berry | 13:48:59 |
Lily Foster | In reply to @janne.hess:helsinki-systems.de it is with berry saner, yeah | 13:49:06 |
Lily Foster | tbh pnpm looks the most promising at this point by far | 13:49:20 |
@janne.hess:helsinki-systems.de | yeah but it will take years for people to adapt that | 13:49:39 |
@janne.hess:helsinki-systems.de | /nix/store/q1c2flcykgr4wwg5a6h450hxbk4ch589-bash-5.2-p15/bin/sh: line 1: c++filt: command not found
/nix/store/q1c2flcykgr4wwg5a6h450hxbk4ch589-bash-5.2-p15/bin/sh: line 1: readelf: command not found
| 13:49:44 |
@janne.hess:helsinki-systems.de | bruh | 13:49:45 |
@janne.hess:helsinki-systems.de | I will leave this here for future reference:
yarnFailHook = /* bash */ ''
printYarnErrors() {
cat /build/xfs-*/build.log
}
failureHooks+=(printYarnErrors)
'';
| 13:50:22 |
@janne.hess:helsinki-systems.de | -in stdenvNoCC.mkDerivation {
+in stdenv.mkDerivation {
pname = "cal.com";
inherit version;
inherit src;
- nativeBuildInputs = [ yarn-berry makeBinaryWrapper ];
+ nativeBuildInputs = [ yarn-berry makeBinaryWrapper pkg-config python3 ];
+ buildInputs = [ vips ];
+
+ npm_config_node_gyp = "${nodejs_18}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js";
+ npm_config_nodedir = srcOnly nodejs_18;
patches = [
(fetchpatch {
this is what it took to fix it. thank you so much Lily Foster 🥳
| 13:52:16 |
@janne.hess:helsinki-systems.de | Can't wait to push this >2GB package to the server :/ | 14:00:35 |
| 6 Jan 2024 |
| lxsymington joined the room. | 21:08:15 |
| 7 Jan 2024 |
lxsymington | Hi, two things. First thing I am hoping to learn to package JS/TS programs, I am fairly early in my nix journey but have read through the nix pills and had a look through the manuals but I am finding the interop with npm lock files a bit of a blocker to my understanding. It seems as if the prevailing solution is to use “generators” to create nix files from the lock files, but I am unsure as to whether that is just for ad hoc packaging or if the same approach is used within nixpkgs? Can anyone recommend a guide/section of the docs that cover this in an accessible way?
This leads me on to the second thing which is that https://github.com/microsoft/vscode-js-debug seems to be included somewhere to be available to VSCode but I don’t think it’s available standalone from nixpkgs, I would be interested in learning how to contribute it to nixpkgs, but that might require more help than creating a package request? | 10:45:53 |
@pkolloch:matrix.org | Heyo everyone,
I'd like to tell nixpkgs's buildNpmPackage which node version to use: nodejs_21 in my case.
How can I do it?
I could override the nodejs arguement but it also references buildPackages (which obviously is rather hard to override) and fetchNpmDeps.
https://github.com/NixOS/nixpkgs/blob/43eec8711993f851dc4f5dec16c0cb2fdb2b1d3a/pkgs/build-support/node/build-npm-package/default.nix#L4
| 19:02:40 |
Lily Foster | In reply to @pkolloch:matrix.org
Heyo everyone,
I'd like to tell nixpkgs's buildNpmPackage which node version to use: nodejs_21 in my case.
How can I do it?
I could override the nodejs arguement but it also references buildPackages (which obviously is rather hard to override) and fetchNpmDeps.
https://github.com/NixOS/nixpkgs/blob/43eec8711993f851dc4f5dec16c0cb2fdb2b1d3a/pkgs/build-support/node/build-npm-package/default.nix#L4
buildNpmPackage { ...; nodejs = nodejs_21; } | 19:03:51 |
@pkolloch:matrix.org | In reply to @lily:lily.flowers
buildNpmPackage { ...; nodejs = nodejs_21; } Thank you! https://github.com/NixOS/nixpkgs/blob/43eec8711993f851dc4f5dec16c0cb2fdb2b1d3a/pkgs/build-support/node/build-npm-package/default.nix#L46 | 19:05:17 |
| 9 Jan 2024 |
| samasaur joined the room. | 00:59:28 |
samasaur | Hi! I'm trying to package a NextJS NPM project with Nix, and I currently am able to build it on aarch64-darwin and x86_64-darwin, but not on Linux, and I really have no idea where to go from here | 01:00:29 |
samasaur | The project is https://github.com/Remote-Text/remote-text-client/tree/nix-flake | 01:01:04 |
samasaur | and the issue I get when building on x86_64-linux is
npm ERR! code 1
npm ERR! path /build/379k76sxq5hfcb5azx75c2k0y66q9p1i-source/node_modules/cypress
npm ERR! command failed
npm ERR! command sh -c node index.js --exec install
npm ERR! Installing Cypress (version: 12.7.0)
npm ERR!
npm ERR! [STARTED] Task without title.
npm ERR! The Cypress App could not be downloaded.
npm ERR!
npm ERR! Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
npm ERR!
npm ERR! Otherwise, please check network connectivity and try again:
npm ERR!
npm ERR! ----------
npm ERR!
npm ERR! URL: https://download.cypress.io/desktop/12.7.0?platform=linux&arch=x64
npm ERR! Error: getaddrinfo EAI_AGAIN download.cypress.io
npm ERR!
npm ERR! ----------
npm ERR!
npm ERR! Platform: linux-x64 (6.1.69)
npm ERR! Cypress Version: 12.7.0
npm ERR! [FAILED] The Cypress App could not be downloaded.
npm ERR! [FAILED]
npm ERR! [FAILED] Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration
npm ERR! [FAILED]
npm ERR! [FAILED] Otherwise, please check network connectivity and try again:
npm ERR! [FAILED]
npm ERR! [FAILED] ----------
npm ERR! [FAILED]
npm ERR! [FAILED] URL: https://download.cypress.io/desktop/12.7.0?platform=linux&arch=x64
npm ERR! [FAILED] Error: getaddrinfo EAI_AGAIN download.cypress.io
npm ERR! [FAILED]
npm ERR! [FAILED] ----------
npm ERR! [FAILED]
npm ERR! [FAILED] Platform: linux-x64 (6.1.69)
npm ERR! [FAILED] Cypress Version: 12.7.0
npm ERR! Log files were not written due to an error writing to the directory: /nix/store/53jgj8pxhifcpqz5hf09j0i5jypngzll-remote-text-web-client-0.1.0-npm-deps/_logs
npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
| 01:02:08 |
samasaur | I tried adding pkgs.cypress to buildInputs and/or nativeBuildInputs, but neither seemed to fix the problem | 01:02:40 |
@julia:the-apothecary.club | I believe that darwin's nix config defaults to the sandbox being disabled, so that's probably why it builds there. (one could verify this assumption with --option sandbox true on macOS or --option sandbox false on Linux. | 01:09:40 |
@julia:the-apothecary.club | From googling, it looks like there's a CYPRESS_RUN_BINARY and CYPRESS_INSTALL_BINARY variable which allows you to set it to an existing path. | 01:13:10 |