Nix NodeJS | 209 Members | |
| 59 Servers |
| Sender | Message | Time |
|---|---|---|
| 12 Sep 2023 | ||
| * 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 | 11:57:51 | |
In reply to @vid:matrix.orgI 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 | |
| yes and no? a nodeJS developer wants to use NixOS to run arbitrary nodeJS related programs, especially maybe going into the age of wasm. In my experience, it takes that person far off their productive happy path into hairy weirdo spiders and snakes. I tried steam-run, it worked as well as my symlink hack, it worked until it stopped working. I mean nodeJS is already infamous for bad distractions. so if a great NixOS nodeJS DX is the desired outcome, I kinda feel it's on topic. except popping into a chroot as a solution is probably a solved problem somewhere else. | 12:05:08 | |
| Yeah. I guess the "running arbitrary executables that crummy tooling auto-downloads" is a problem independent of node.js though, even if it does show up in some node.js packages (off the top of my head vcpkg also does that, unfortunately) | 12:07:20 | |
| one inflection might be this channel is for very NixOS specific development, whereas I'm talking about relating it to a general experience where if you have node/npm (or their equivalents) you're up for anything. NixOS specific development could be using a nix file instead of package.json, or nix specific directives, etc. | 12:07:33 | |
| I don't think we actually even have a topic technically set, so 🤷♀️ | 12:08:05 | |
| I'm fine with general node.js discussion on nix/nixpkgs/nixos here tbh. Not like it gets much activity anyway | 12:09:05 | |
| (I just don't have playwright- or node-specific answers for you on this particular problem. Someone else might though) | 12:10:17 | |
| I could point you at a repo if you're really bored / curious. clone https://github.com/withhaibun/haibun-e2e-tests then npm i; npm run build; npm run test counter | 12:14:27 | |
| I had to keep going so I created an ubuntu vm, but it's … not ideal | 12:16:12 | |
| Yeah the best we have for running arbitrary prebuilt files on nixos without modification is (the incredibly hacky) nix-ld + envfs + something like nix-alien or (the slightly less incredibly hacky) steam-run. If the latter broke though you could open a nixpkgs issue to get it fixed | 12:26:16 | |
Or you could just run it in a container and use podman in your personal build commands | 12:26:41 | |
| Or nixify the project 😈 | 12:26:53 | |
| I thought about using containers that but I want to be focused on general DX. already have people on mac &c using it. I mean I know why you're saying it but nixos is basically the odd one out here, creating the problem, even if it's ultimately a better way | 12:28:21 | |
| * I thought about using containers but I want to be focused on general DX. already have people on mac &c using it. I mean I know why you're saying it but nixos is basically the odd one out here, creating the problem, even if it's ultimately a better way | 12:29:01 | |
| Feel free to work on or look for more/better nixos solutions here, I'm just saying I don't know anything better while still using nixos | 12:29:40 | |
| You could use direnv or something too to set up the environment automatically on your system without having to change it system-wide or change upstream stuff | 12:30:34 | |
| (Fwiw I do use nix-ld, envfs, nix-alien, and direnv all to some degree specifically for dealing with devving on random repos occasionally. I often find myself just writing a quick shell.nix for a repo that handles env setup and satisfying the project's expectations, and that combo usually works for me. I don't use playwright though so obviously ymmv) | 12:31:57 | |
| yes I appreciate that. my experience getting a lot of things working on nixos was fantastic, I was raving about it to colleagues, but this is a lot. I want haibun to be easily consumable on any platform, which is already a lot of work. no idea what adaptation would look like on cloud. this is a typical developer pov, that's all I can say. | 12:33:14 | |
| (I take that back. It doesn't work for the systemd test suite so I do keep a fedora vm around for that) | 12:33:28 | |
In reply to @vid:matrix.orgYeah your pov is appreciated! I just wish I had better answers | 12:33:54 | |
In reply to @lily:lily.flowers(Systemd test suite has pretty deep system and kernel expectations that must be met. Someone was working on a NixOS test framework setup that runs it though) | 12:34:35 | |
In reply to @lily:lily.flowers(If you do find something that helps developer DX for this, do send it over to awesome-nix to make it more discoverable for people too!) | 12:38:28 | |
| * (If you do find something that helps developer experience for this, do send it over to awesome-nix to make it more discoverable for people too!) | 12:38:45 | |
| I would love to, but have to put it aside right now. nixos is a means to an end for me, not the end. | 12:38:59 | |
| (Also I was kinda suggesting asking in a more general channel because people a lot smarter than me are more likely to give you better answers there 😅) | 12:42:31 | |
| maybe when I have more time. I'm very happy with nixos otherwise. and since I use workspaces with hotkeys, having to use a vm is not the end of the world. | 12:46:57 | |
| * maybe when I have more time. I'm very happy with nixos otherwise. and since I use workspaces with hotkeys and x-forwarding, having to use a vm is not the end of the world. | 12:49:12 | |
| * maybe when I have more time. I'm very happy with nixos otherwise. and since I use workspaces with hotkeys and x-forwarding, having to use a vm is not the end of the world. it is a pretty convoluted setup, though. | 12:50:29 | |
| * maybe when I have more time. I'm very happy with nixos otherwise. and since I use workspaces with hotkeys and x-forwarding, having to use a vm is not the end of the world. it is a pretty convoluted setup, though. but that will only get worse if I start tailouring the repo to the OS. | 12:51:56 | |