!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

199 Members
57 Servers

Load older messages


SenderMessageTime
3 Jan 2024
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI hope not13:41:22
@lily:lily.flowersLily Fosterand you do need nodedir too13:41:31
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI had another package recently that needed yarn, npm and node13:41:34
@lily:lily.flowersLily Foster
In reply to @janne.hess:helsinki-systems.de
I hope not
(that var just activates a sleeper agent we installed in npm to fix some of its broken behavior and inject vars when their fetcher lib re-execs the entirety of npm for git deps........)
13:42:17
@lily:lily.flowersLily Foster
In reply to @lily:lily.flowers
(that var just activates a sleeper agent we installed in npm to fix some of its broken behavior and inject vars when their fetcher lib re-execs the entirety of npm for git deps........)
(their coherence model for the moving parts of npm is utterly hecked)
13:42:51
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deTIL about srcOnly13:44:27
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @lily:lily.flowers
(that var just activates a sleeper agent we installed in npm to fix some of its broken behavior and inject vars when their fetcher lib re-execs the entirety of npm for git deps........)
obviously :D
13:44:47
@lily:lily.flowersLily Foster
In reply to @lily:lily.flowers
(that var just activates a sleeper agent we installed in npm to fix some of its broken behavior and inject vars when their fetcher lib re-execs the entirety of npm for git deps........)
(and it re-execs npm without necessarily even ensuring lockfiles are coherent in the git dep and requiring them since it doesn't lock those needed deps in the original lockfile. and npm loves to silently get spooked, ignore the lockfile, and try to redownload literally everything..........)
13:45:32
@lily:lily.flowersLily Foster(oh and don't forget it drops the passed options when it re-execs. i mean come on, who needs those?)13:46:18
@lily:lily.flowersLily 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:lily.flowersLily Foster(ugh npm makes me sad)13:46:44
@lily:lily.flowersLily Foster(sorry for rant...)13:46:50
@janne.hess:helsinki-systems.de@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:lily.flowersLily 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@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