!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

194 Members
56 Servers

Load older messages


SenderMessageTime
8 Feb 2024
@kranzes:matrix.org@kranzes:matrix.orgOr whatever that's called 03:12:47
@kranzes:matrix.org@kranzes:matrix.orgI don't mind buildNpmPackage03:13:12
@adis:blad.is@adis:blad.is
In reply to @kranzes:matrix.org
Is this because of npmHooks?
This is because it's not really doing much, so it's a functional stdenv abstraction for not much gain
04:11:08
@adis:blad.is@adis:blad.is

Essentially it's just this:

stdenv.mkDerivation (args // {
  inherit npmDeps npmBuildScript;

  nativeBuildInputs = nativeBuildInputs
    ++ [ nodejs npmConfigHook npmBuildHook npmInstallHook nodejs.python ]
    ++ lib.optionals stdenv.isDarwin [ darwin.cctools ];
  buildInputs = buildInputs ++ [ nodejs ];

  strictDeps = true;

  # Stripping takes way too long with the amount of files required by a typical Node.js project.
  dontStrip = args.dontStrip or true;

  meta = (args.meta or { }) // { platforms = args.meta.platforms or nodejs.meta.platforms; };
})
04:11:32
@adis:blad.is@adis:blad.isMy take is: Just use the hooks04:12:49
@adis:blad.is@adis:blad.is stdenv.mkDerivation wrappers are an anti-pattern 04:13:19
@adis:blad.is@adis:blad.isUsing the hooks is more composable as well04:14:06
@adis:blad.is@adis:blad.isIt makes it possible to for example build a Go application backend and the web frontend all in one derivation04:14:58
@adis:blad.is@adis:blad.isThat's already possible mind you04:15:36
@adis:blad.is@adis:blad.is But because we have buildNpmPackage that's not as obvious as it could be 04:15:42
10 Feb 2024
@drupol:matrix.org@drupol:matrix.orgHey, I'm trying to build a NPM package here: https://github.com/NixOS/nixpkgs/pull/287527 Can you have a look at the build log in the first post and give some pointers and/or documentation ?08:45:01
@julia:the-apothecary.club@julia:the-apothecary.clublooks like you solved your issue?09:35:04
@sandro:supersandro.deSandro 🐧Reducing dependencies of applications that use yarn https://github.com/NixOS/nixpkgs/pull/28190213:17:17
@drupol:matrix.org@drupol:matrix.org
In reply to @julia:the-apothecary.club
looks like you solved your issue?
Not yet.
22:50:40
@drupol:matrix.org@drupol:matrix.org Apparently it doesn't find jq and sponge, but those dependencies are in nativeBuildInputs, I don't understand why it doesn't find it. 22:51:38
@drupol:matrix.org@drupol:matrix.orgSee the log :https://github.com/NixOS/nixpkgs/pull/287527/checks?check_run_id=2143857592922:51:42
@drupol:matrix.org@drupol:matrix.orgI've also open an issue here: https://github.com/NixOS/nixpkgs/pull/28789423:11:03
@drupol:matrix.org@drupol:matrix.org
In reply to @drupol:matrix.org
Apparently it doesn't find jq and sponge, but those dependencies are in nativeBuildInputs, I don't understand why it doesn't find it.
I got rid of jq and sponge, so that issue is no more relevant!
23:13:14
11 Feb 2024
@julia:the-apothecary.club@julia:the-apothecary.club
In reply to @drupol:matrix.org
See the log :https://github.com/NixOS/nixpkgs/pull/287527/checks?check_run_id=21438575929

hmm. I mean it looks like a specific package is failing to build. what's the build output locally?

it's a build hard to tell from the ofborg logs because nix builds things in parallel

03:10:17
@julia:the-apothecary.club@julia:the-apothecary.clubdoing it locally means the builds which succeed get saved and you can more easily ignore the good ones03:10:43
15 Feb 2024
@a-kenji:matrix.orgkenji joined the room.19:15:29
16 Feb 2024
@adis:blad.is@adis:blad.is
In reply to * @adis:blad.is
should put buildNodeModules in nixpkgs
https://github.com/NixOS/nixpkgs/pull/289231
08:51:56
28 Feb 2024
@szucsitg:matrix.orgszucsitgI'm trying to build a project with nx, but none of the optionaldepencies downloaded for it (nor esbuild, swc...). How can I do this with buildNpmPackage?17:04:13
29 Feb 2024
@szucsitg:matrix.orgszucsitg I gave it another go, and my nx knowledge is shallow but it seems like nx run-many is failing in the build. Also by rewriting scripts from "nx":"nx" to "build":"nx run...." solved my optional dependency issue 🤷 07:54:41
8 Mar 2024
@kyle:iteratee.net@kyle:iteratee.net joined the room.20:01:26
@kyle:iteratee.net@kyle:iteratee.net I recently patched pnpm2nix-nzbr to work with pnpm workspaces for a project at work. Are the people here that would be interested in that work? Even if just out of curiosity to see what changes were necessary? 20:07:08
@hexa:lossy.networkhexa I need to npm install and get the resulting dir for a build 22:46:42
@hexa:lossy.networkhexabut I only get the _cacache in out that way 😄 22:47:01
@lily:lily.flowersLily Foster
In reply to @hexa:lossy.network
but I only get the _cacache in out that way 😄
hmm?
22:51:08
@hexa:lossy.networkhexa_cacache package-lock.json 22:51:30

Show newer messages


Back to Room ListRoom Version: 6