| 22 May 2023 |
raitobezarius | is there a way to extract a nodejs from buildNpmPackage function? | 12:11:02 |
raitobezarius | or the result of the buildNpmPackage? | 12:11:06 |
Lily Foster | Like what nodejs that buildNpmPackage is using? | 12:16:48 |
Lily Foster | No, but we maybe should add it as a passthrough or something | 12:17:17 |
Lily Foster | In reply to @raitobezarius:matrix.org or the result of the buildNpmPackage? Like the output, or am I misunderstanding? | 12:17:33 |
raitobezarius | In reply to @lily:lily.flowers Like what nodejs that buildNpmPackage is using? yes this | 12:17:45 |
dotlambda | In reply to @lily:lily.flowers dotlambda: If it helps for fixing the above package, would it be okay if I separate out the change to add an npmWorkspace argument from that bitwarden-cli PR and make my own separate PR? (or alternatively if you have time to respond to the review comments, we can keep the work in that PR) Definitely! Thank you very much | 20:05:25 |
| 24 May 2023 |
Lily Foster | In reply to @raitobezarius:matrix.org yes this You're just wanting something like this on buildNpmPackage, right?
diff --git a/pkgs/build-support/node/build-npm-package/default.nix b/pkgs/build-support/node/build-npm-package/default.nix
index 1c3fb6a74ef..f4cb7d763ed 100644
--- a/pkgs/build-support/node/build-npm-package/default.nix
+++ b/pkgs/build-support/node/build-npm-package/default.nix
@@ -53,7 +53,7 @@ stdenv.mkDerivation (args // {
# Stripping takes way too long with the amount of files required by a typical Node.js project.
dontStrip = args.dontStrip or true;
- passthru = { inherit npmDeps; } // (args.passthru or { });
+ passthru = { inherit nodejs npmDeps; } // (args.passthru or { });
meta = (args.meta or { }) // { platforms = args.meta.platforms or nodejs.meta.platforms; };
})
| 00:21:33 |
Lily Foster | Wait are you wanting (buildNpmPackage { ... }).nodejs to be available or something just like buildNpmPackage.nodejs? | 00:22:23 |
Lily Foster | In reply to @robert:funklause.de Definitely! Thank you very much Opened as https://github.com/NixOS/nixpkgs/pull/233804 and tested against your second commit in your bitwarden-cli PR :) | 11:18:28 |
Lily Foster | Oh I just noticed your comment about npm prune --workspace being non-ideal. That seems bizarre to me, and remove the --workspace on the prune command didn't seem to reduce output size 🤔 | 11:23:52 |
Lily Foster | * Oh I just noticed your comment about npm prune --workspace being non-ideal. That seems bizarre to me, and removing the --workspace on the prune command didn't seem to reduce output size 🤔 | 11:23:59 |
Lily Foster | I'll investigate later today hopefully | 11:24:08 |
| 25 May 2023 |
| raitobezarius changed their display name from raitobezarius to disko in NixOS 23.11 when. | 13:32:24 |
| raitobezarius changed their display name from disko in NixOS 23.11 when to raitobezarius. | 13:37:28 |
| 27 May 2023 |
| NixOS Moderation Botchanged room power levels. | 16:41:01 |
| 28 May 2023 |
| hellwolf joined the room. | 13:29:10 |
hellwolf | Hey y'all! Let's say I pick a rfew nodePakcages e.g "nodePackages.three|mathjax", what would a one liner say using nix-shell where then I can run node and require("three")? | 13:34:44 |
Lily Foster | I think we would need setup hooks that set NODE_PATH. Which actually would probably be a good idea to add to the nodejs derivation | 13:41:51 |
Lily Foster | Hmmm if I remember later I'll experiment with adding that | 13:42:18 |
hellwolf | Okay. Something similar to haskellPackages.ghcWithPackages would be handy, say:
nix-shell -p 'nodejsPackages.nodeWithPackages { pkgs: [ pkgs.three ] } ?
| 14:06:45 |
Lily Foster | Well it would be something like nodejs.withPackages probably but also nodePackages is gonna go away and/or be redone before that's viable... | 14:08:49 |
hellwolf | I see.
I don't think it's too big a stretch to proposing the Nth package manager for NodeJS ecosytem, after now pnpm. | 14:10:06 |
hellwolf | I think Nix has the potential to be the right one :) | 14:10:19 |
hellwolf | But still need that Nth nix node builder though too. | 14:10:54 |
hellwolf | Or is buildNpmPackage targeting that? | 14:11:25 |
hellwolf | * Or is buildNpmPackage targeting that role? | 14:11:27 |
Lily Foster | buildNpmPackage is really more for leaf-like application-level npm packages | 14:12:03 |
Lily Foster | At some point we may end up trying to build out a real Nix-based node package set, but npm dependencies go really deep. Unlike how other package sets like python generally are | 14:14:08 |
Lily Foster | So I doubt it'll really be worth it tbh | 14:14:23 |