| 30 Jul 2023 |
hexa | let's hope we don't need to copy the lock file into the repo | 00:32:33 |
gdamjan | the offlineCache? | 00:41:32 |
gdamjan | I might just remove it, no? | 00:41:40 |
gdamjan | hm, trying to run the nixosTests.matrix-appservice-irc, but it fails with Failed to parse 'config.schema.json': Expecting value: line 1 column 1 (char 0) and there's also DeprecationWarning: The jsonschema CLI is deprecated and will be removed in a future version. Please use check-jsonschema instead, which can be installed from https://pypi.org/project/check-jsonschema/ | 00:47:03 |
hexa | In reply to @gdamjan:spodeli.org I might just remove it, no? no idea about yarn, sorry | 00:52:06 |
gdamjan | oh, my typo :facepalm: | 00:57:33 |
Lily Foster | No you need package.json for yarn2nux | 01:09:18 |
Lily Foster | * No you need package.json for yarn2nix | 01:09:23 |
Lily Foster | But the offlineCache avoids the need to vendor yarn.lock and yarn.nix | 01:09:36 |
hexa | gdamjan: fyi https://github.com/NixOS/nixpkgs/pull/246123 | 01:11:08 |
Lily Foster | (to clarify, it tries to pull the package name from IFD otherwise) | 01:11:11 |
Lily Foster | Tbh you can probably get by without yarn2nix at all, though, if you are already having to override phases | 01:11:19 |
Lily Foster | There's a few packages that use yarn --offline with fetchYarnDeps and don't use mkYarnPackage at all | 01:11:39 |
Lily Foster | * There's a few packages that use yarn --offline install with fetchYarnDeps and don't use mkYarnPackage at all | 01:11:43 |
gdamjan | what was IFD again? | 01:13:37 |
Lily Foster | Import-from-derivation | 01:13:55 |
Lily Foster | When you try to builtins.readFile or import from the result of a derivation (like a fetched FOD) | 01:14:13 |
hexa | when one derivation needs to wait for the result of another derivation | 01:14:14 |
hexa | something that's explicitly disabled on hydra | 01:14:23 |
hexa | there are a few more functions that import under the hood https://nixos.wiki/wiki/Import_From_Derivation#Recognizing_IFD | 01:15:14 |
hexa | it will work for you locally, and that's what makes it tricky 🙂 | 01:17:36 |
gdamjan | heh | 01:17:44 |
gdamjan | ok. let me try again the stdenv.mkDerivation path then | 01:19:57 |
Lily Foster | In reply to @hexa:lossy.network it will work for you locally, and that's what makes it tricky 🙂 I mean, it won't work for you locally anymore if you add --no-allow-import-from-derivation to the nix command (which is just what ofborg does iirc) | 02:27:20 |
gdamjan | In reply to @gdamjan:spodeli.org ok. let me try again the stdenv.mkDerivation path then https://gist.github.com/gdamjan/08901abe49baadf083034e93ed32ccbe#file-default-2-nix I have no idea how kosher this is ^ | 03:09:48 |
gdamjan | (ignore that I use my fork, that was to prune some additional deps) | 03:10:17 |
gdamjan | but yarnLock = "${src}/yarn.lock"; would still be a problem, no? so I need to take yarn.lock and add it to nixpkgs ? | 03:11:17 |
gdamjan | going to sleep now ... see ya tomorrow | 03:13:06 |
gdamjan | that's this change https://github.com/matrix-org/matrix-appservice-irc/pull/1758 | 03:13:59 |
Lily Foster | In reply to @gdamjan:spodeli.org but yarnLock = "${src}/yarn.lock"; would still be a problem, no? so I need to take yarn.lock and add it to nixpkgs ? Not for fetchYarnDeps because it doesn't use the path at eval time (no import or read or anything), it's only used build time | 03:15:17 |