!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

210 Members
62 Servers

Load older messages


SenderMessageTime
8 Nov 2023
@szucsitg:matrix.orgszucsitg Yeah, thanks for the reminder, I'm aware of the downside, it's not critical to keep it as a secret as it's read-only. However now I know why it didn't work. Because it couldn't download it. {"error": "authorization required to access package @xlts.dev/angular"} 16:05:08
@szucsitg:matrix.orgszucsitgAlso I'm not sure how did you know the path 🤔16:05:27
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
Also I'm not sure how did you know the path 🤔
The error message had the hash, so i converted it to hex and i know how the cacache paths work
16:05:49
@lily:lily.flowersLily Foster(i maintain the fetcher code that puts together that cache for npm)16:06:05
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
I also read it back, that it should be added to the daemon, but I don't really want that, so I tried pre and postpatch hooks, but it didn't work, so I added to the flake as env.NIX_NPM_TOKENS
can you share a (redacted) example of what you are putting in it?
16:06:30
@szucsitg:matrix.orgszucsitgI tried to debug my setup with printenv in postpatch hook but envvar is set in the shell, maybe my format is off?!16:06:31
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org
I also read it back, that it should be added to the daemon, but I don't really want that, so I tried pre and postpatch hooks, but it didn't work, so I added to the flake as env.NIX_NPM_TOKENS
* can you share a (redacted) example of what you are putting in the env var?
16:06:34
@szucsitg:matrix.orgszucsitg This is within buildNpmPackage derivation env.NIX_NPM_TOKENS=''{"http://registry.xlts.dev":"eyJ...."}''; 16:10:07
@lily:lily.flowersLily Fosterah, it should be a hostname16:14:29
@lily:lily.flowersLily Foster just {"registry.xlts.dev":"eyJ..."} 16:14:38
@szucsitg:matrix.orgszucsitg Actually it is just the host name, I guess the pasting screwed up 16:18:24
@lily:lily.flowersLily Foster Here's a wild shot in the dark -- did you invalidate the npmDepsHash and try to rebuild after adding the NIX_NPM_TOKENS? 16:18:58
@lily:lily.flowersLily Foster Also that env.NIX_NPM_TOKENS is on the fetcher derivation, right? 16:19:09
@lily:lily.flowersLily Foster (not buildNpmPackage) 16:19:15
@szucsitg:matrix.orgszucsitgI invalidated the hash, but I'm not sure how could I override the fetcher16:19:44
@lily:lily.flowersLily Foster so you could add your own npmDepsHash 16:20:21
@lily:lily.flowersLily Foster But I think you could hack it in postPatch 16:20:29
@lily:lily.flowersLily Foster like postPatch = "export NIX_NPM_TOKENS=..."; on buildNpmPackage because that gets inherited into the fetcher 16:20:42
@lily:lily.flowersLily Foster (env does not) 16:20:46
@lily:lily.flowersLily Foster * so you could add your own npmDeps 16:25:32
@szucsitg:matrix.orgszucsitgI first tried the postpatch but eval failed on it, I just realized I used the wrong quote in export 🤦‍♂16:27:02
@szucsitg:matrix.orgszucsitgThanks for helping me out, this did the trick16:27:19
@szucsitg:matrix.orgszucsitg I spent two days to figure out this, and couldn't 16:28:22
@lily:lily.flowersLily FosterAwesome, glad that worked!16:29:21
@lily:lily.flowersLily FosterLet me know if you have other issues with it16:29:27
9 Nov 2023
@wisw:im.skytel.eewisw joined the room.14:27:08
@szucsitg:matrix.orgszucsitg

I am trying to build a frontend with mkYarnPackage but it fails on download for this lockfile

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"duo_web_sdk@https://github.com/duosecurity/duo_web_sdk#v2.9":
  version "2.7.0"
  resolved "https://github.com/duosecurity/duo_web_sdk#378e855ce4a1de1d1b2f7fd60465e564b3e9fbda"

The error is:

error: hash mismatch in fixed-output derivation '/nix/store/yxmkgwcrvzfmhhxjqkrcnd49fr8fv1bi-duosecurity_duo_web_sdk.drv':
         specified: sha1-N46FXOSh3h0bL3/WBGXlZLPp+9o=
            got:    sha1-DbsHW3BaLQrtZoh0x5znwdK9xAc=

I'm not sure why the hash doesn't align

15:29:00
@c0ba1t:matrix.orgCobaltThat looks interesting, Have you tried to refresh the npmDeps Hash?15:34:42
@szucsitg:matrix.orgszucsitg I'm not defining it's just:
mkYarnPackage {
name = "node-modules";
src=./.;
}
15:40:15
@lily:lily.flowersLily Foster
In reply to @szucsitg:matrix.org

I am trying to build a frontend with mkYarnPackage but it fails on download for this lockfile

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"duo_web_sdk@https://github.com/duosecurity/duo_web_sdk#v2.9":
  version "2.7.0"
  resolved "https://github.com/duosecurity/duo_web_sdk#378e855ce4a1de1d1b2f7fd60465e564b3e9fbda"

The error is:

error: hash mismatch in fixed-output derivation '/nix/store/yxmkgwcrvzfmhhxjqkrcnd49fr8fv1bi-duosecurity_duo_web_sdk.drv':
         specified: sha1-N46FXOSh3h0bL3/WBGXlZLPp+9o=
            got:    sha1-DbsHW3BaLQrtZoh0x5znwdK9xAc=

I'm not sure why the hash doesn't align

what is the hash in the lockfile? it's not in your snippet
15:43:29

Show newer messages


Back to Room ListRoom Version: 6