!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

209 Members
59 Servers

Load older messages


SenderMessageTime
30 Jul 2023
@gdamjan:spodeli.orggdamjanI'll open a PR for the mkDerivation if this is the better approach than mkYarnPackage12:44:53
@lily:lily.flowersLily FosterI think it probably will be, but I'm also biased in that I want to kill yarn2nix 🙈12:45:33
@gdamjan:spodeli.orggdamjan:D12:46:18
@gdamjan:spodeli.orggdamjanI'm ok with biases12:46:30
@gdamjan:spodeli.orggdamjan btw, what is passthru.updateScript ? 12:49:03
@gdamjan:spodeli.orggdamjan it's funny how yarn install --offline calls the prepare or build script from package.json without the --offline flag :/ 13:03:17
@gdamjan:spodeli.orggdamjan

not very happy with that --ignore-scripts there, but without it, it fails to build the code?!

yarn install v1.22.19                                                                                                                           [150/1989][1/5] Validating package.json...                                             
[2/5] Resolving packages...                                                  
[3/5] Fetching packages...                                                                                                                                
[4/5] Linking dependencies...                                                                                                                             
[5/5] Building fresh packages...                                             
$ yarn run build                                                                                                                                          
yarn run v1.22.19                                                                                                                                         
warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.                                    
$ yarn run build:app && yarn run build:widget                                
warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.                                    
$ tsc --project ./tsconfig.json       
/bin/sh: tsc: not found                                                                                                                                   
error Command failed with exit code 127. 
13:07:17
@gdamjan:spodeli.orggdamjan

and one more nitpick, ./result/bin/matrix-appservice-irc prints this message:

Usage:                                                                       

Generating an application service registration file:                                                                                                      
/nix/store/5vm8fh4q21xlk7i1y6rqykqar296dglr-nodejs-slim-18.16.1/bin/node -r [-f /path/to/save/registration.yaml] -u 'http://localhost:6789' -c CONFIG_FILE
 [-l my-app-service]     

is there some better wrapper in nix I can use instead of https://github.com/matrix-org/matrix-appservice-irc/blob/develop/bin/matrix-appservice-irc ?

13:08:56
@gdamjan:spodeli.orggdamjan
In reply to @gdamjan:spodeli.org

not very happy with that --ignore-scripts there, but without it, it fails to build the code?!

yarn install v1.22.19                                                                                                                           [150/1989][1/5] Validating package.json...                                             
[2/5] Resolving packages...                                                  
[3/5] Fetching packages...                                                                                                                                
[4/5] Linking dependencies...                                                                                                                             
[5/5] Building fresh packages...                                             
$ yarn run build                                                                                                                                          
yarn run v1.22.19                                                                                                                                         
warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.                                    
$ yarn run build:app && yarn run build:widget                                
warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.                                    
$ tsc --project ./tsconfig.json       
/bin/sh: tsc: not found                                                                                                                                   
error Command failed with exit code 127. 
there = https://github.com/NixOS/nixpkgs/pull/246188/files
13:09:17
@lily:lily.flowersLily Foster
In reply to @gdamjan:spodeli.org
it's funny how yarn install --offline calls the prepare or build script from package.json without the --offline flag :/
That's entirely upstream's fault: https://github.com/matrix-org/matrix-appservice-irc/blob/0afb064635d37e039067b5b3d6423448b93026d3/package.json#L14
13:12:38
@gdamjan:spodeli.orggdamjanyeah, Im inclined to maybe `sed` it out13:52:41
@gdamjan:spodeli.orggdamjan hexa: will you give it a go on your staging environment? you do have staging, right, RIGHT :) 14:32:38
@hexa:lossy.networkhexano, I do not14:33:18
@hexa:lossy.networkhexathis is a community network that I tend to in my spare time14:33:27
@hexa:lossy.networkhexabut I don't suppose we're going to find any smaller user on short notice14:34:56
@hexa:lossy.networkhexabecause most individual users will have switched to heisenbridge14:37:09
@gdamjan:spodeli.orggdamjanok, I'll try to cook something up14:47:08
@robert:funklause.dedotlambda
In reply to @lily:lily.flowers
That's entirely upstream's fault: https://github.com/matrix-org/matrix-appservice-irc/blob/0afb064635d37e039067b5b3d6423448b93026d3/package.json#L14
What would be a better thing to put in package.json?
15:41:21
@lily:lily.flowersLily FosterHonestly, idk. I'd rather either package.json have a direct way to chain lifecycle scripts or yarn just had a config setting for offline so flags wouldn't have to be propagated15:43:05
@robert:funklause.dedotlambda I'm improving remove-attr.py slightly in https://github.com/NixOS/nixpkgs/pull/246155 15:47:13
@lily:lily.flowersLily Foster
In reply to @robert:funklause.de
I'm improving remove-attr.py slightly in https://github.com/NixOS/nixpkgs/pull/246155
I'll try to review tonight! (US eastern tz)
15:49:51
31 Jul 2023
@robert:funklause.dedotlambda

I get

Error: invalid HTTP request

Caused by:
    invalid format

when running prefetch-npm-deps on https://github.com/cloudflare/workers-sdk/blob/wrangler%403.3.0/package-lock.json
Is that because of the empty string key?

{
  "name": "wrangler-root",
  "version": "0.0.0",
  "lockfileVersion": 2,
  "requires": true,
  "packages": {
    "": {
06:17:58
@gdamjan:spodeli.orggdamjanhttps://github.com/matrix-org/matrix-appservice-irc/releases/tag/1.0.109:14:11
@gdamjan:spodeli.orggdamjanall in all, I like the fetchYarnDeps + mkDerivation combo. less magic, more control, and it's not that hard at all09:30:37
@gdamjan:spodeli.orggdamjan

one question about https://github.com/NixOS/nixpkgs/pull/246188 … I have nodejs-slim in nativeBuildInputs, so that makes it depend on slim at runtime. Is this a good approach?


  nativeBuildInputs = [
    prefetch-yarn-deps
    nodejs-slim
    nodejs.pkgs.yarn
    nodejs.pkgs.node-gyp-build
  ];
09:34:26
@gdamjan:spodeli.orggdamjanalthough, nodejs-slim-18.16.1 still depends on icu4c-73.2-dev, openssl-3.0.9-dev, openssl-3.0.9-dev and zlib-1.2.13-dev :/ - not more than 10MB but still09:41:36
@lily:lily.flowersLily Foster
In reply to @robert:funklause.de

I get

Error: invalid HTTP request

Caused by:
    invalid format

when running prefetch-npm-deps on https://github.com/cloudflare/workers-sdk/blob/wrangler%403.3.0/package-lock.json
Is that because of the empty string key?

{
  "name": "wrangler-root",
  "version": "0.0.0",
  "lockfileVersion": 2,
  "requires": true,
  "packages": {
    "": {
It is not because of that. That is normal. I'll see if I can check sometime today but I'm betting there's a suspicious resolved uri
10:55:14
@lily:lily.flowersLily Foster
In reply to @gdamjan:spodeli.org

one question about https://github.com/NixOS/nixpkgs/pull/246188 … I have nodejs-slim in nativeBuildInputs, so that makes it depend on slim at runtime. Is this a good approach?


  nativeBuildInputs = [
    prefetch-yarn-deps
    nodejs-slim
    nodejs.pkgs.yarn
    nodejs.pkgs.node-gyp-build
  ];
I mean I guess if it works, sure. I don't know any downsides
10:56:16
@gdamjan:spodeli.orggdamjanworks for now :)10:57:32
@lily:lily.flowersLily FosterWait why would having it in nativeBuildInputs affect the runtime interpreter........11:02:07

Show newer messages


Back to Room ListRoom Version: 6