| 25 Oct 2023 |
Lily Foster | or if you just want to dm a tarball so i can build that works. whatever is easiest for you | 14:09:22 |
Lily Foster | also one day we'll make it so you don't need npmDepsHash for same-repo derivations... it's on the list and will function similarly to importCargoLock from the rust tooling | 14:10:02 |
@ThorHop:matrix.org | yey ^^ | 14:10:23 |
| 27 Oct 2023 |
| Federico Damián Schonborn changed their profile picture. | 01:24:02 |
| Emma [it/its] ⚡️ joined the room. | 21:58:15 |
| 31 Oct 2023 |
Emma [it/its] ⚡️ | question, how does one set up a reference to a package lock without using import-from-derivation (which isnt allowed in nixpkgs)? | 10:29:06 |
Lily Foster | In reply to @emma:conduit.rory.gay question, how does one set up a reference to a package lock without using import-from-derivation (which isnt allowed in nixpkgs)? what kind of reference? | 10:36:09 |
Emma [it/its] ⚡️ | https://github.com/NixOS/nixpkgs/pull/222939/files#diff-cc2f60d50c60395c8a53b2140e8e18eaadce9e455dc5f9ed0ae09a38fba24a95R31-R37 | 10:39:01 |
Lily Foster | oh this is mkYarnPackage | 10:39:37 |
Lily Foster | You gotta copy the package.json into nixpkgs | 10:39:46 |
Lily Foster | it's dumb | 10:39:50 |
Emma [it/its] ⚡️ | theres no way around that? | 10:40:01 |
Lily Foster | not really without patching yarn2nix (which i started to do, but i guess i never finished and PR'd it) | 10:40:38 |
Emma [it/its] ⚡️ | i guess you'd need to include yarn.lock too, no? | 10:40:42 |
Lily Foster | not if you use fetchYarnDeps | 10:40:57 |
Emma [it/its] ⚡️ | oh, i guess i dont need root level yarnLock then? | 10:41:16 |
Lily Foster | yep was just typing that :) | 10:41:26 |
Emma [it/its] ⚡️ | hm, cant i use fetchFile for the package.lock? | 10:41:46 |
Emma [it/its] ⚡️ | to at least keep it out of nixpkgs that is | 10:42:04 |
Lily Foster | fetchFile? | 10:42:12 |
Emma [it/its] ⚡️ | idk theres something to fetch a file from a url somewhere | 10:42:24 |
Lily Foster | and no yarn2nix has a hard req on the package.json being available. you can package yarn stuff without it though in most situations (and it even avoids the yarn2nix bugs to do that....) | 10:42:59 |
Lily Foster | In reply to @emma:conduit.rory.gay idk theres something to fetch a file from a url somewhere fetchurl? | 10:43:05 |
Lily Foster | that's still a derivation and yarn2nix still builtins.readFile's it, which is IFD | 10:43:45 |
Emma [it/its] ⚡️ | ah | 10:44:23 |
Lily Foster | In reply to @lily:lily.flowers and no yarn2nix has a hard req on the package.json being available. you can package yarn stuff without it though in most situations (and it even avoids the yarn2nix bugs to do that....) (if you want an example of a yarn package done using mkDerivation i can give you a link to prior art in nixpkgs) | 10:44:25 |
Emma [it/its] ⚡️ | well ideally i'd like to not ship package.json in nixpkgs | 10:45:06 |
Lily Foster | here's an example where yarn2nix had some bug and the package was switched to using mkDerivation: https://github.com/NixOS/nixpkgs/pull/248107/files | 10:47:32 |
Lily Foster | if you would rather just dump yarn2nix/mkYarnPackage entirely | 10:47:47 |
Emma [it/its] ⚡️ | oh, that doesnt even look too messy | 10:48:21 |