!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

210 Members
61 Servers

Load older messages


SenderMessageTime
30 Jul 2023
@lily:lily.flowersLily Foster(Still surprised it allows it at all though)10:54:40
@gdamjan:spodeli.orggdamjan Lily Foster: executive decision time. stdenv.mkDerivation https://gist.github.com/gdamjan/08901abe49baadf083034e93ed32ccbe#file-default-2-nix
or try to hack around with mkYarnPackage and try to make https://gist.github.com/gdamjan/08901abe49baadf083034e93ed32ccbe#file-default-nix work ?
12:23:33
@lily:lily.flowersLily Foster
In reply to @gdamjan:spodeli.org
Lily Foster: executive decision time. stdenv.mkDerivation https://gist.github.com/gdamjan/08901abe49baadf083034e93ed32ccbe#file-default-2-nix
or try to hack around with mkYarnPackage and try to make https://gist.github.com/gdamjan/08901abe49baadf083034e93ed32ccbe#file-default-nix work ?
Why do you have to set the yarn config twice here? https://gist.github.com/gdamjan/08901abe49baadf083034e93ed32ccbe#file-default-2-nix-L71
12:25:08
@lily:lily.flowersLily Foster Also if you can use fixup-yarn-lock from prefetch-yarn-deps rather than fixup_yarn_lock from yarn2nix https://github.com/NixOS/nixpkgs/issues/240174 12:26:06
@gdamjan:spodeli.orggdamjanI don't know, but the yarn --production pruning tried to download without that (and failed because of the --ofline) 12:26:11
@gdamjan:spodeli.orggdamjanI'm guessing themktemp HOME was removed between the phases?12:27:01
@gdamjan:spodeli.orggdamjan * I'm guessing the mktemp HOME was removed between the phases?12:27:08
@lily:lily.flowersLily Foster
In reply to @gdamjan:spodeli.org
I'm guessing the mktemp HOME was removed between the phases?
Oh yeah it's because of this https://gist.github.com/gdamjan/08901abe49baadf083034e93ed32ccbe#file-default-2-nix-L58
12:27:27
@lily:lily.flowersLily FosterIs that necessary?12:27:33
@gdamjan:spodeli.orggdamjan
In reply to @lily:lily.flowers
Is that necessary?
I've seen it used in nixpkgs, but let's check
12:28:04
@gdamjan:spodeli.orggdamjanbut afaik HOME is where yarn config stores the config, and without it, nix sets HOME to a non-existent directory, doesn't it?12:29:25
@lily:lily.flowersLily FosterNo i mean why set home twice?12:30:16
@lily:lily.flowersLily FosterIt should just be needed once12:30:20
@gdamjan:spodeli.orggdamjanI thought it was a different shell instance12:31:18
@lily:lily.flowersLily FosterNo all phases are evaluated in the same bash instance in stdenv12:32:05
@gdamjan:spodeli.orggdamjanlet me see12:32:09
@lily:lily.flowersLily Foster
In reply to @lily:lily.flowers
No all phases are evaluated in the same bash instance in stdenv
(Unless you call bash again in your phase I guess)
12:32:36
@gdamjan:spodeli.orggdamjanyou're right. thanks.12:33:59
@gdamjan:spodeli.orggdamjanhttps://github.com/NixOS/nixpkgs/compare/master...gdamjan:nixpkgs:bump-matrix-appservice-irc-2?expand=1 here's that in pre-PR form :D12:42:06
@lily:lily.flowersLily FosterSweet! I'll be able to take a look in like ~6 hours (feel free to remind me if I forget too....)12:43:15
@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

Show newer messages


Back to Room ListRoom Version: 6