!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

208 Members
58 Servers

Load older messages


SenderMessageTime
11 Sep 2023
@vid:matrix.org@vid:matrix.orgI'd like to be social instead of starting off with a question, but I have a question. trying to get playwright working. there is probably a better way to do this (flakes?) but this is where I'm at: https://github.com/vid/nixos/blob/main/playwright.nix however, there is some kind of problem with low level library set up. I guess it comes down to finding /lib64/ld-linux-x86-64.so.2 I've buckled a lot of swashes, but feel stuck here, any suggestions?18:48:32
@vid:matrix.org@vid:matrix.orgchatgpt is telling me I have to patch the binaries. I am starting to see the problem with nix with this, it's a whole minefield of footguns18:56:06
@lily:lily.flowersLily Foster
In reply to @vid:matrix.org

I'd like to be social instead of starting off with a question, but I have a question. trying to get playwright working. there is probably a better way to do this (flakes?) but this is where I'm at: https://github.com/vid/nixos/blob/main/playwright.nix

however, there is some kind of problem with low level library set up. I guess it comes down to finding /lib64/ld-linux-x86-64.so.2
I've buckled a lot of swashes, but feel stuck here, any suggestions?

Can you tell us more of what you are trying to run specifically? Something's very wrong here if you are having to manually muck with ld path stuff
19:12:03
@vid:matrix.org@vid:matrix.orgthat's what I'm hoping. I'm just trying to install https://github.com/Microsoft/playwright. it installs ELF binaries for firefox, chrome, webkit. so I had to install a bunch of libraries to support them (see my playwright.nix). but it still can't launch because I guess it needs /lib64/ld-linux-x86-64.so.2, which is under /nix/store/<hash>/19:16:01
@vid:matrix.org@vid:matrix.org * that's what I'm hoping. I'm just trying to install and use https://github.com/Microsoft/playwright. it installs ELF binaries for firefox, chrome, webkit. so I had to install a bunch of libraries to support them (see my playwright.nix). but it still can't launch because I guess it needs /lib64/ld-linux-x86-64.so.2, which is under /nix/store/<hash>/ 19:16:14
@vid:matrix.org@vid:matrix.org * that's what I'm hoping. I'm just trying to install and use https://github.com/Microsoft/playwright. it installs ELF binaries for firefox, chrome, webkit. so I had to install a bunch of libraries to support them (see my playwright.nix). but it still can't launch because I guess it expects /lib64/ld-linux-x86-64.so.2, but its under /nix/store/<hash>/ 19:16:37
@vid:matrix.org@vid:matrix.org * that's what I'm hoping. I'm just trying to install and use https://github.com/Microsoft/playwright. it installs ELF binaries for firefox, chrome, webkit. so I had to install a bunch of libraries to support them (see my playwright.nix). but it still can't launch because I guess it expects /lib64/ld-linux-x86-64.so.2, but its under /nix/store/\<hash>/ 19:17:10
@vid:matrix.org@vid:matrix.org * that's what I'm hoping. I'm just trying to install and use https://github.com/Microsoft/playwright. it installs ELF binaries for firefox, chrome, webkit. so I had to install a bunch of libraries to support them (see my playwright.nix). but it still can't launch because I guess it expects /lib64/ld-linux-x86-64.so.2, but its under /nix/store/<hash>/ 19:17:17
@vid:matrix.org@vid:matrix.orgif I do this terrible thing, it works; sudo mkdir /lib64; sudo ln -s /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/ld-linux-x86-64.so.2 /lib64/ 19:24:57
@vid:matrix.org@vid:matrix.org * if I do this terrible thing, it works; sudo mkdir /lib64; sudo ln -s /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/ld-linux-x86-64.so.2 /lib64/ 19:25:22
@vid:matrix.org@vid:matrix.org would something bad happen if I found a way to create that symlink on switch? 19:26:33
@vid:matrix.org@vid:matrix.orgI want to keep the node repo pure of nix things, and I don't want to have to remember to patch things 19:27:11
@vid:matrix.org@vid:matrix.orgok I did it, please don't hate me. https://github.com/vid/nixos/blob/main/playwright.nix#L5419:34:14
@lily:lily.flowersLily FosterYou, uh, might be interested in nix-ld19:36:36
@lily:lily.flowersLily Foster programs.nix-ld.enable I think 19:36:46
@lily:lily.flowersLily Foster
In reply to @vid:matrix.org
ok I did it, please don't hate me. https://github.com/vid/nixos/blob/main/playwright.nix#L54
(I'm not gonna hate you don't worry 😅)
19:37:14
@lily:lily.flowersLily Foster
In reply to @vid:matrix.org
that's what I'm hoping. I'm just trying to install and use https://github.com/Microsoft/playwright. it installs ELF binaries for firefox, chrome, webkit. so I had to install a bunch of libraries to support them (see my playwright.nix). but it still can't launch because I guess it expects /lib64/ld-linux-x86-64.so.2, but its under /nix/store/<hash>/
Ideally you can use the playwright from nixpkgs which I think has built-in drivers, but I understand if not
19:38:16
@lily:lily.flowersLily Foster(Stuff like nix-ld and envfs or nix-alien are for when you have to accept that you'll have to run prebuilt binaries that aren't packaged sometimes)19:39:01
@lily:lily.flowersLily Foster(Also I'm not sure what this has to do with node.js really but I'm glad I could help I guess)19:39:27
@spion:mozilla.orgspion joined the room.19:41:41
@spion:mozilla.orgspion 19:41:44
@vid:matrix.org@vid:matrix.orgoh that's interesting, thanks. I guess I still have to run a shell, but that's not too bad. Looking into it. you're right this is probably more general than node.js, but though maybe there's a specific workaround for using playwright with its node.js library (rather than packaged standalone version). 19:41:45
@vid:matrix.org@vid:matrix.org * oh that's interesting, thanks. I guess I still have to run a shell, but that's not too bad. Looking into it. you're right this is probably more general than node.js, but thought maybe there's a specific workaround for using playwright with its node.js library (rather than packaged standalone version). 19:42:55
@vid:matrix.org@vid:matrix.orghmm it looks like nix-ld … creates a symlink in /lib64 (-: but it expands on that19:45:21
@vid:matrix.org@vid:matrix.orgok, it requires wrapping each binary. no idea how that would work with a binary called by a library. and going to be a headache for every program I try. starting to look like I'll have to do this kind of dev in a vm19:51:04
12 Sep 2023
@keiichi:matrix.org@keiichi:matrix.org joined the room.11:28:11
@9hp71n:matrix.orgghpzin joined the room.11:33:24
@vid:matrix.org@vid:matrix.orgtotally off the path now, but I wonder why chroot isn't used to solve these kinds of problems. seems more clean than nix-ld &c11:55:15
@vid:matrix.org@vid:matrix.org * totally off the path now, but I wonder why chroot isn't used to solve these kinds of problems. seems more clean than nix-ld &c, which require piling hacks on hacks11:57:51
@lily:lily.flowersLily Foster
In reply to @vid:matrix.org
totally off the path now, but I wonder why chroot isn't used to solve these kinds of problems. seems more clean than nix-ld &c, which require piling hacks on hacks
I mean I guess that's kinda what steam-run is (which is not steam-specific despite its name). Though that's technically bwrap, not chroot. Also now we're really getting away from being about nix node.js tooling 😛
11:59:32

Show newer messages


Back to Room ListRoom Version: 6