!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

207 Members
59 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
3 Jan 2024
@janne.hess:helsinki-systems.de@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:lily.flowersLily Fosterand their solution to lockfile reproducibility involves actually sane locking that doesn't produce megabytes large dep trees13:48:26
@janne.hess:helsinki-systems.de@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:lily.flowersLily Foster(now if only their lockfile format was sane....)13:48:53
@janne.hess:helsinki-systems.de@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:lily.flowersLily Foster
In reply to @janne.hess:helsinki-systems.de
it is with berry
saner, yeah
13:49:06
@lily:lily.flowersLily Fostertbh pnpm looks the most promising at this point by far13:49:20
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deyeah but it will take years for people to adapt that13:49:39
@janne.hess:helsinki-systems.de@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@janne.hess:helsinki-systems.debruh13:49:45
@janne.hess:helsinki-systems.de@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@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@janne.hess:helsinki-systems.deCan't wait to push this >2GB package to the server :/14:00:35
6 Jan 2024
@lxsymington:matrix.orglxsymington joined the room.21:08:15
7 Jan 2024
@lxsymington:matrix.orglxsymington

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@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

Show newer messages


Back to Room ListRoom Version: 6