!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

206 Members
58 Servers

Load older messages


SenderMessageTime
9 Mar 2026
@scrumplex:duckhub.ioScrumplex * I am currently working on importPnpmLock to support package builds without having a pnpmDeps FOD: https://tangled.org/scrumplex.net/importPnpmLock.nix This is mostly useful for projects that use dependabot or renovate where keeping pnpmDeps up-to-date is cumbersome. It is very bare bones, but should support everything pnpm has to offer due to its fundamental design: Instead of trying to be smart about it, we just use the existing mitmcache infrastructure from nixpkgs. Luckily, the pnpm lock file contains everything* we need and the only issue is that it's a YAML file, leading to IFD in my implementation. While a pnpm2nix-style script would have avoided IFD, it would have the same issues as the status quo (updating hashes). *: Git as well as tarball dependencies are not locked with the exact tarball hash. Those have to be specified manually, similar to how importCargoLock does it. 20:58:21
@rosssmyth:matrix.org@rosssmyth:matrix.orgNice! I was looking into making an IFD pnpm lockfile import23:52:30
10 Mar 2026
@amadaluzia:unredacted.orgamadaluzia joined the room.01:46:22
11 Mar 2026
@srasu:srasu.orgsrasu joined the room.01:48:34
@srasu:srasu.orgsrasu Hello! I'm trying out packaging out-of-your-element and I'm trying to figure out how to use buildNpmPackage to do so. It seems like doing that doesn't result in me being able to call the various scripts available via npm run <subcommand>, which is the primary way to interact with it. Is there a way to do that with buildNpmPackage? 01:50:35
@hexa:lossy.networkhexanone of the scripts looks like a build script02:00:15
@srasu:srasu.orgsrasu that's correct, there's no "build", it's just a collection of scripts meant to be run with npm run 02:01:08
@srasu:srasu.orgsrasu The flow I'm looking for here more or less is to be able to do a nix run .#ooye-setup to call the npm run setup command, use it interactively to produce a file, then use requireFile to provide it to another derivation that will call npm run start 02:01:28
@srasu:srasu.orgsrasuI don't know if that will be feasible02:01:54
@srasu:srasu.orgsrasuI think I figured it out for my case02:58:27
@srasu:srasu.orgsrasu I ended up needing to make my own installPhase that copied over the project to the $out and used makeWrapper to make scripts that call node to run the relevant scripts. 02:59:00
@srasu:srasu.orgsrasu
{
  lib,
  pkgs,
  buildNpmPackage,
  importNpmLock,
  nodejs ? pkgs.nodejs_22,
  ...
}:

buildNpmPackage (finalAttrs: {
  pname = "ooye";
  version = "3.4";

  src = builtins.fetchGit {
    url = https://gitdab.com/cadence/out-of-your-element/;
    rev = "c55e6c611585f4c1dbfd8c767e5f872fbeb0c66a";
    ref = "v${finalAttrs.version}";
  };

  npmDepsHash = "";

  npmDeps = importNpmLock { npmRoot = finalAttrs.src; };

  npmConfigHook = importNpmLock.npmConfigHook;
  dontNpmBuild = true;

  installPhase = ''
    runHook preInstall
    mkdir -p $out
    mkdir -p $out/bin
    cp -R . $out/source
    makeWrapper ${nodejs}/bin/node $out/bin/ooye-setup --add-flags $out/source/scripts/setup.js
    makeWrapper ${nodejs}/bin/node $out/bin/ooye --add-flags $out/source/start.js
    runHook postInstall
  '';

  npmPackFlags = [ "--ignore-scripts" ];
})
Like this
02:59:36
@benwebb:matrix.orgbenwebb joined the room.06:27:08
5 Dec 2022
@grahamc:nixos.org@grahamc:nixos.org changed the history visibility to "world_readable" from "shared".14:44:17
@hexa:lossy.networkhexaThanks14:44:25
@winterqt:nixos.devWinter (she/her)
In reply to @hexa:lossy.network
Thanks
it doesn't look like he read the message, are you sure it wasn't just your server syncing the history :P
14:45:19
@hexa:lossy.networkhexa?14:45:48
@aktaboot:tchncs.deaktaboot

grahamc (he/him) made the room history world readable. Events may be now read by non-joined people.

14:46:07
@grahamc:nixos.org@grahamc:nixos.orgonly future history14:46:16
@aktaboot:tchncs.deaktaboot *

grahamc (he/him) made the room history world readable. Events may be now read by non-joined people.

14:46:21
@hexa:lossy.networkhexaYeah doesnt work into the past14:46:34
@hexa:lossy.networkhexaIMG_20221205_154711.jpg
Download IMG_20221205_154711.jpg
14:47:23
@winterqt:nixos.devWinter (she/her)
In reply to @hexa:lossy.network
Yeah doesnt work into the past
ah. by default you mean?
14:47:55
@aktaboot:tchncs.deaktaboothuh, I don't see dash's messages 🤔14:49:55
@washort:greyface.org@washort:greyface.orgOh no15:11:34
@washort:greyface.org@washort:greyface.orgDid you scroll all the way back to April? 😉15:12:27
9 Dec 2022
@winterqt:nixos.devWinter (she/her) @aktaboot, I can't repro your issue, FWIW. The only thing that was being thrown was that Python was missing, right? 03:04:29
13 Dec 2022
@raphi:tapesoftware.netraphi joined the room.19:01:16
14 Dec 2022
@jeroen:simonetti.nlJeroen Simonetti joined the room.17:42:51
@jeroen:simonetti.nlJeroen Simonetti

Hello,
I am trying to package github.com/zwave-js/zwave-js-ui but am getting an error during build phase of which I don;t realy know what to make of it. Mind you, I am a total nodejs novice, so this is probably due to pebkac. I would appreciate some help.
The error I am having is:

@nix { "action": "setPhase", "phase": "buildPhase" }
building
SyntaxError: Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in lockfile
    at Parser.unexpected (/nix/store/0s6r2hk9ry5nln2p66nr9db95xihksjg-prefetch-yarn-deps/libexec/yarnpkg-lockfile.js:5064:11)
    at Parser.parse (/nix/store/0s6r2hk9ry5nln2p66nr9db95xihksjg-prefetch-yarn-deps/libexec/yarnpkg-lockfile.js:5193:14)
    at parse (/nix/store/0s6r2hk9ry5nln2p66nr9db95xihksjg-prefetch-yarn-deps/libexec/yarnpkg-lockfile.js:5262:17)
    at module.exports.exports.default (/nix/store/0s6r2hk9ry5nln2p66nr9db95xihksjg-prefetch-yarn-deps/libexec/yarnpkg-lockfile.j>
    at prefetchYarnDeps (/nix/store/0s6r2hk9ry5nln2p66nr9db95xihksjg-prefetch-yarn-deps/libexec/index.js:129:28)
    at main (/nix/store/0s6r2hk9ry5nln2p66nr9db95xihksjg-prefetch-yarn-deps/libexec/index.js:183:9)
17:45:27

Show newer messages


Back to Room ListRoom Version: 6