!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

209 Members
60 Servers

Load older messages


SenderMessageTime
9 Aug 2023
@countoren:matrix.orgcountorensupplements has older version of angular/cli20:43:20
@countoren:matrix.orgcountorenbut trying to use this version that is generated by node2nix has missing dependencies like build-angular20:43:53
@countoren:matrix.orgcountoren * supplements has older version of angular/cli(8.3.21)20:45:07
@countoren:matrix.orgcountorenwill I be able to use fetchNpmDeps in order to download 8.3.21?20:46:30
@lily:lily.flowersLily FosterfetchNpmDeps downloads whatever versions are in the package-lock.json file21:27:01
@lily:lily.flowersLily FosterIf it's the old versions then it'll use the old versions21:27:12
@lily:lily.flowersLily Foster Also we are looking to deprecate the nodePackages set at some point because it's bitrot pretty bad at this point and has architectural issues 21:28:28
@countoren:matrix.orgcountorenwhat will be the differnece between fetchNpmDeps to node2nix?23:26:00
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
I could test if you got something.
Okay I made a thing for passing in an environment variable that looks like NIX_NPM_TOKENS='{"regsistry.fontawesome.com":"token"}'. Do you think you could apply this patch to your nixpkgs and see if you can set NIX_NPM_TOKENS on your builder/nix daemon? https://github.com/lilyinstarlight/nixpkgs/compare/5a8e9243812ba528000995b294292d3b5e120947...24f435dd88b47f53011bc1f296fd0347699ef451.diff
23:27:22
@countoren:matrix.orgcountorenyes for sure23:27:40
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
what will be the differnece between fetchNpmDeps to node2nix?
node2nix generates nix expressions and does its own locking of dependencies needed for a node package. It also includes (questionable...) build logic to turn those into a coherent package with built libraries, cli scripts, and such. fetchNpmDeps just reads an existing package-lock.json and downloads those deps in a way that npm can find them later when in the nix sandbox (which has no internet). buildNpmPackage includes hooks that have their own build logic to turn an npm application into a coherent package
23:29:15
@lily:lily.flowersLily Foster (node2nix sorta does both fetching deps and building a package but in a significantly different paradigm. It's unmaintained these days though) 23:30:22
@lily:lily.flowersLily Foster
In reply to @countoren:matrix.org
what will be the differnece between fetchNpmDeps to node2nix?
* node2nix generates nix expressions and does its own locking of dependencies needed for a node package. It also includes (questionable...) build logic to turn those into a coherent package with built libraries, cli scripts, and such. fetchNpmDeps just reads an existing package-lock.json and downloads those deps in a way that npm can find them later when in the nix sandbox (which has no internet). buildNpmPackage includes hooks that have their own build logic to turn an npm application into a coherent package
23:30:41
@countoren:matrix.orgcountorenso there will be no way to manually replace/add dependencies with buildNpmPackage23:31:07
@lily:lily.flowersLily Foster If they need to be replaced then the package-lock.json file needs to be patched 23:31:22
@countoren:matrix.orgcountorenor non strightforawd at least23:31:29
@lily:lily.flowersLily Foster Which can be done, but there's no concept of "replacing" specifically in buildNpmPackage (since you'd just be patching the upstream files before buildNpmPackage even sees it) 23:31:51
@lily:lily.flowersLily Foster (I mean similar would be true of node2nix as well) 23:31:59
@lily:lily.flowersLily Foster * If they need to be replaced then the package.json and/or package-lock.json files need to be patched 23:32:20
@lily:lily.flowersLily Foster * If they need to be replaced then the package-lock.json and possibly package.json files need to be patched 23:32:34
@countoren:matrix.orgcountorenyes, but it will be easier to store and compose the tars like what I did with node2nix23:33:01
@countoren:matrix.orgcountorenin nix expressions23:33:05
@countoren:matrix.orgcountorennpm pack to get the private tars23:33:21
@countoren:matrix.orgcountorenand then just replace them in sources of node2nix23:33:32
@countoren:matrix.orgcountorenbut I guess there should be a way to do it in the package-lock23:34:04
@lily:lily.flowersLily Foster Like editing the .nix file output of running node2nix? 23:34:08
@countoren:matrix.orgcountorenyes23:34:17
@countoren:matrix.orgcountorenno23:34:22
@countoren:matrix.orgcountorensorry23:34:24
@lily:lily.flowersLily FosterApologies, I'm still having trouble grasping what exactly it is you are attempting here 😅23:34:47

Show newer messages


Back to Room ListRoom Version: 6