!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

202 Members
58 Servers

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


SenderMessageTime
25 Aug 2024
@felschr:matrix.orgfelschrCould somebody take a look at this PR? https://github.com/NixOS/nixpkgs/pull/33375917:19:19
@emilazy:matrix.orgemilyany pnpm-knowers here? do we have any way of backporting pnpm-using things to 24.05?20:18:05
26 Aug 2024
@emilazy:matrix.orgemily(answer: yes, I backported it :P)21:53:36
27 Aug 2024
@oliver.falvai:oliverfalvai.xyzoliver.falvai joined the room.10:57:16
@mat:matrix.matmoa.xyz@mat:matrix.matmoa.xyz joined the room.13:24:30
@aloisw:kde.org@aloisw:kde.org left the room.17:20:21
29 Aug 2024
@mat:matrix.matmoa.xyz@mat:matrix.matmoa.xyzHey, any idea if it's possible to build a npm project and then build a go module in a flake.nix ? I can't find anything at all about building web frontends as part of packages ... I can pre-build the frontend files and then use this flake to build the binary but having to commit pre-built static files is kinda silly .... https://github.com/MathieuMoalic/amumax/blob/main/flake.nix13:04:13
@winter:catgirl.cloudWinterjust build it in two derivations13:20:16
@mat:matrix.matmoa.xyz@mat:matrix.matmoa.xyzThanks, I think I made it work using two derivations, I am really new to this and I didn't know it could be as simple as that ^^'14:39:47
@greg:thehellings.comgregThere are several apps in nixpkgs that do exactly what you're discussing. I found them when I was trying and failing to get Homarr to build in Nix15:35:52
@greg:thehellings.comgreg Cook CLI does that, but with Rust instead of Go. Gotify seems to do what you're suggesting, mat 15:37:39
@greg:thehellings.comgreghttps://github.com/NixOS/nixpkgs/tree/master/pkgs/servers/gotify15:38:17
@mat:matrix.matmoa.xyz@mat:matrix.matmoa.xyzThanks!16:04:25
@adis:blad.is@adis:blad.is

It's actually not that hard to build it as one derivation.

buildGoModule {
  npmDeps = fetchNpmDeps { ... }; # Or use importNpmLock
  npmBuildScript = "build";
  nativeBuildInputs = with npmHooks; [ npmConfigHook npmBuilidHook npmInstallHook nodejs.python ]; # Or importNpmLock.npmConfigHook
}
23:27:55
@adis:blad.is@adis:blad.is ^ This kinda thing is a reason why we should move away from functional abstractions a la buildNpmPackage to stdenv hooks instead 23:29:27
@adis:blad.is@adis:blad.isIt's a bit too hard to grok composition currently23:29:38
@emilazy:matrix.orgemily(but why build one derivation when you can build two?)23:30:26
@adis:blad.is@adis:blad.is
In reply to @emilazy:matrix.org
(but why build one derivation when you can build two?)
I'm a bit of a derivation collector myself
23:34:11
@winter:catgirl.cloudWinter
In reply to @adis:blad.is

It's actually not that hard to build it as one derivation.

buildGoModule {
  npmDeps = fetchNpmDeps { ... }; # Or use importNpmLock
  npmBuildScript = "build";
  nativeBuildInputs = with npmHooks; [ npmConfigHook npmBuilidHook npmInstallHook nodejs.python ]; # Or importNpmLock.npmConfigHook
}
it's not i just forgot if buildGoModule fucks it up or not
23:50:25
@winter:catgirl.cloudWinter
In reply to @adis:blad.is
^ This kinda thing is a reason why we should move away from functional abstractions a la buildNpmPackage to stdenv hooks instead
providing both isn't bad when you don't need composition, which is why i provided both and not just one (...like Go...)
23:50:57

Show newer messages


Back to Room ListRoom Version: 6