Nix NodeJS | 206 Members | |
| 59 Servers |
| Sender | Message | Time |
|---|---|---|
| 13 Oct 2023 | ||
There's only one example derivation rn in the docs iirc and it's not very informative. Just the bare basic you can do with buildNpmPackage | 16:21:15 | |
| Like for me, with my learning disability, it's hard when it's not clear what the difference between certain functions or methods are, and i sort of require the full context in front of me to "learn by doing" so to speak - sometimes even simple explanations and reminders of basic things supercharges my learning process. So suddenly I have to hop around search queries when the documentation isn't clear enough, test, and test, then test some more until I reach some solution. So I'm having an extra hard time learning nix ^^; But eh, nix is what I need for my future projects, so I have to paddle through it. | 16:24:40 | |
| * Like for me, with my learning disability, it's hard when it's not clear what the difference between certain functions or methods are, and i sort of require the full context in front of me to "learn by doing" so to speak - sometimes even simple explanations and reminders of basic things supercharges my learning process. Without it I have to hop around search queries when the documentation isn't clear enough, test, and test, then test some more until I reach some solution. So I'm having an extra hard time learning nix ^^; But eh, nix is what I need for my future projects, so I have to paddle through it. | 16:26:09 | |
| Yeah, i also feel that we do not make nix* documentation particularly discoverable or accessible, unfortunately :( (i know for nodejs stuff it's a bandwidth problem because i've mostly been having to maintain stuff alone and haven't had sufficient motivation to write more docs than i have) | 16:27:52 | |
| I have the memory of a goldfish -.-; it really sucks | 16:28:00 | |
| Are there any mid-sized, open-source projects using nixpkg's buildNpmPackage? Maybe linking to them as examples might be useful | 16:53:32 | |
In reply to @c0ba1t:matrix.orgUsing downstream or packaged with it in nixpkgs? | 16:58:45 | |
| Downstream, though examples from nixpkg's might be nice too. | 17:00:20 | |
| In general just tested and used examples. Ofc nixpkg's might be good too but imo it's sometimes a bit too complex | 17:01:19 | |
| 14 Oct 2023 | ||
| Does buildNpm have troubles with sourcehut git sources?
| 03:14:41 | |
If I give it git through nativeBuildInputs it'll fail to reach out of its sandbox while running git --no-replace-objects ls-remote https://git.sr.ht/~cadence/nodejs-discord-markdown which seems super weird | 03:17:33 | |
| ah the issue is not in the fetcher it's in the config step | 03:28:17 | |
| Is there a reason mkYarnPackage doesn't cache or am I doing something wrong? All dependecies are cached but the package itself isn't so it rebuilds every time | 09:45:33 | |
In reply to @dandellion:dodsorf.asHmmmm if i remember i'll try to investigate later of it's just our fetcher not doing something right or if npm is the one who is choking on it | 11:46:03 | |
In reply to @ahbk:matrix.orgCache like upload to cachix or something? | 11:46:25 | |
In reply to @lily:lily.flowersNo sorry not cached. I'm not sure I understand this, but I when the flake is changed, I guess the yarn package has to be recalculated or evaluated which takes some time (about 15 seconds). This is different from the other packages in the flake which are evaluated almost immediately if they haven't been changed. I experienced this as a cache miss but I realize now that it is not about that. Here's the flake: No https://github.com/ahbk/ahbk/blob/main/flake.nix | 14:40:39 | |
In reply to @lily:lily.flowers* No sorry not cached. I'm not sure I understand this, but I when the flake is changed, I guess the yarn package has to be recalculated or evaluated which takes some time (about 15 seconds). This is different from the other packages in the flake which are evaluated almost immediately if they haven't been changed. I experienced this as a cache miss but I realize now that it is not about that. Here's the flake: https://github.com/ahbk/ahbk/blob/main/flake.nix | 14:40:47 | |
| * No sorry not cached. I'm not sure I understand this, but when the flake is changed, I guess the yarn package has to be recalculated or evaluated which takes some time (about 15 seconds). This is different from the other packages in the flake which are evaluated almost immediately if they haven't been changed. I experienced this as a cache miss but I realize now that it is not about that. Here's the flake: https://github.com/ahbk/ahbk/blob/main/flake.nix | 14:40:56 | |
| * No sorry not cached. I'm not sure I understand this, but when the flake is changed I think the yarn package has to be recalculated or evaluated which takes some time (about 15 seconds), even if the change didn't affect the package. This is different from the other packages in the flake which are evaluated almost immediately if they haven't been changed. I experienced this as a cache miss but I realize now that it is not about that. Here's the flake: https://github.com/ahbk/ahbk/blob/main/flake.nix | 14:41:38 | |
| * No sorry not cached. I'm not sure I understand this, but when the flake is changed I think the yarn package has to be recalculated or evaluated which takes some time (about 15 seconds), even if the change didn't affect the package. This is different from the other packages in the flake which are evaluated almost immediately if they haven't been changed. I experienced this as a cache miss but I realize now that it is not about that. Here's the flake: https://github.com/ahbk/ahbk/blob/main/flake.nix#L39 | 14:42:36 | |
In reply to @ahbk:matrix.orgAh, you might want to look into something like https://github.com/numtide/nix-filter | 14:44:13 | |
| neat, thanks! | 14:45:29 | |
In reply to @lily:lily.flowers I made an impure derivation, and now it's failing with:
I don't know if it's very relevant, but it's kind of sus | 22:59:52 | |
In reply to @dandellion:dodsorf.asThat is pretty weird, but i'm not sure how relevant it is. I'm assuming this is all an artifact of that npm does not consider sourcehut a source that it can pull tarballs from and must fall back to git checkout. As for where that is going wrong, i need to dive in to our tooling again and instrument npm to find why it doesn't like that | 23:02:16 | |
fwiw running nix develop on the derivation, and then manually running the npmConfigHook and such does succesfully build it | 23:03:20 | |
In reply to @dandellion:dodsorf.asThat's expected since dev shell lets npm call out to the internet when it's not supposed to need to (npm gets very very happy about silently deciding something is wrong and deleting and redownloading from the internet....) | 23:04:12 | |
| Dandellion: Do you think you could share your derivation for me to poke at later? | 23:04:49 | |
| sure! | 23:04:56 | |
In reply to @lily:lily.flowersAh right, yeah, I'm mainly confused about why the impure derivation then fails to build | 23:05:30 | |
| since nix develop should also come with npmDeps from the npm fetcher | 23:05:52 | |