| 9 Aug 2023 |
countoren | supplements has older version of angular/cli | 20:43:20 |
countoren | but trying to use this version that is generated by node2nix has missing dependencies like build-angular | 20:43:53 |
countoren | * supplements has older version of angular/cli(8.3.21) | 20:45:07 |
countoren | will I be able to use fetchNpmDeps in order to download 8.3.21? | 20:46:30 |
Lily Foster | fetchNpmDeps downloads whatever versions are in the package-lock.json file | 21:27:01 |
Lily Foster | If it's the old versions then it'll use the old versions | 21:27:12 |
Lily 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 | what will be the differnece between fetchNpmDeps to node2nix? | 23:26:00 |
Lily 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 | yes for sure | 23:27:40 |
Lily 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 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 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 | so there will be no way to manually replace/add dependencies with buildNpmPackage | 23:31:07 |
Lily Foster | If they need to be replaced then the package-lock.json file needs to be patched | 23:31:22 |
countoren | or non strightforawd at least | 23:31:29 |
Lily 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 Foster | (I mean similar would be true of node2nix as well) | 23:31:59 |
Lily 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 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 | yes, but it will be easier to store and compose the tars like what I did with node2nix | 23:33:01 |
countoren | in nix expressions | 23:33:05 |
countoren | npm pack to get the private tars | 23:33:21 |
countoren | and then just replace them in sources of node2nix | 23:33:32 |
countoren | but I guess there should be a way to do it in the package-lock | 23:34:04 |
Lily Foster | Like editing the .nix file output of running node2nix? | 23:34:08 |
countoren | yes | 23:34:17 |
countoren | no | 23:34:22 |
countoren | sorry | 23:34:24 |
Lily Foster | Apologies, I'm still having trouble grasping what exactly it is you are attempting here 😅 | 23:34:47 |