!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

843 Members
166 Servers

Load older messages


SenderMessageTime
26 Nov 2025
@rav:vergara.techRene Hello. Can anyone point me to an example of a flake to build a NodeJS/Angular project?
I found some tutorials about node2nix, but it keeps failing when trying to build the canvas Node package. It's using an older version of node-gyp that doesn't like python-3.13. The recommended solution of also installing Python's setuptools does not solve the issue (by adding it to buildInputs or nativeBuildInputs).
15:24:52
@rav:vergara.techRene

I managed to get the newer version of node-gyp, now it can't find pkg-config:

npm error /nix/store/rlq03x4cwf8zn73hxaxnx0zn5q9kifls-bash-5.3p3/bin/sh: line 1: pkg-config: command not found
npm error gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp

I have pkg-config in the buildInputs, and have even overridden the Node package's buildInputs to add it, it still can't find it.

17:20:22
@flyx:klacker.euflyx if I fetch a .zip file as flake input with flake = false;, it gets unzipped automatically. how can I set the filename encoding when unzipping? 21:50:57
28 Nov 2025
@rav:vergara.techRene After further research, this error is not because pkg-config is missing, it's because pixman-1 can't be found. The PKG_CONFIG_PATH is not being set.
Is there an expression to add something in buildInputs to PKG_CONFIG_PATH?
13:04:33
@anniecrudeness:matrix.organniecrudeness joined the room.18:06:59
@antono:matrix.organtono changed their profile picture.18:43:16
@dramforever:matrix.orgdramforeverput pixman in buildInputs and pkg-config in nativeBuildInputs, i think23:54:53
@dramforever:matrix.orgdramforevernode-gyp has strictDeps = true23:55:20
29 Nov 2025
@rav:vergara.techRenei'll give this a try02:11:58
@rav:vergara.techRene Didn't work. I tried putting this for the overall package derivation, and inside the Node module that is asking for pixman, same result. It seems the PKG_CONFIG_PATH is not being set. 13:26:47
@dramforever:matrix.orgdramforeverunfortunately i don't really know how node stuff works...13:30:43
@rav:vergara.techRene Hmm... I just saw that the node2nix tool I'm trying to use hasn't been updated in 3 years. I'm just going to assume it's broken 13:39:07
@dramforever:matrix.orgdramforever

a fairly basic

mkShell {
  strictDeps = true; 
  nativeBuildInputs = [ pkg-config ]; 
  buildInputs = [ pixman ]; 
}

does make pixman show up in PKG_CONFIG_PATH

13:44:03
@rav:vergara.techRene That's why I'm thinking the issue is in the auto-generated derivations node2nix makes for each dependency 13:46:01
@dramforever:matrix.orgdramforeverso i'm also not sure where it could go wrong for node13:46:04
@rav:vergara.techReneI was hoping to nixify this, I think I'll just use the flake to set the node version, and then do the rest the old-fashioned way13:49:47
@rav:vergara.techRene I do think node2nix may be buggy, I noticed that every time I tried to build, it creates a new hash in /nix/store with a copy of all the deps. Filled up the storage fast with all my attempts 13:51:23
@keiichi:matrix.orgteto Rene: node2nix has been dead for a long time, use buildNpmPackage from nixpkgs 16:25:07
@keiichi:matrix.orgtetoit works much better. there is a nix nodejs matrix room with reactive people16:25:32
30 Nov 2025
@o_________o:matrix.orgo_________o joined the room.01:08:56
@tbaldwin:matrix.orgTrent BaldwinAre there any projects that let you load a project.toml kind of like buildnpmpackage does for npm.lock files so you can manage dependencies in one place? 17:58:49
@3wy-kra:matrix.uni-hannover.deMasen Joumaah joined the room.20:47:04
1 Dec 2025
@brisingr05:matrix.orgBrisingr changed their display name from Brisingr05 to Brisingr.18:40:06
@piredman:matrix.orgpiredman joined the room.23:23:28
2 Dec 2025
@fuckill:matrix.org@fuckill:matrix.org joined the room.11:50:55
@fuckill:matrix.org@fuckill:matrix.org removed their display name Fuckill.12:46:11
@fuckill:matrix.org@fuckill:matrix.org left the room.12:46:18
@mex:the-apothecary.clubLillianOfTheValley joined the room.19:00:36
3 Dec 2025
@aaronjan:matrix.orgaaronjan joined the room.00:14:00
@0xmagus:matrix.org0xmagus joined the room.00:55:38

There are no newer messages yet.


Back to Room ListRoom Version: 6