| 25 Jan 2025 |
Ilan Joselevich (Kranzes) | We also have lib.isStorePath, not sure why the type isn't using it | 15:05:30 |
trofi | Ah, nice! That one seems to work. | 19:11:32 |
trofi | Tried to use it and it fails: isStorePath only returns true for exactly the store dirs, like /nix/store/foo, but not files within them like /nix/store/foo/bin/bar. | 19:16:30 |
| 26 Jan 2025 |
Ilan Joselevich (Kranzes) | Can you not just do lib.hasPrefix builtins.storeDir | 01:13:18 |
@aloisw:julia0815.de | That would match slightly more stuff (/nix/store itself and hidden files/subdirectories). Also it does not fix the issue at hand. | 07:14:54 |
trofi | No, CA derivations don't have it as a prefix:
nix-repl> hello.outPath
"/1121rp0gvr1qya7hvy925g5kjwg66acz6sn1ra1hca09f1z5dsab"
| 12:41:26 |
Ilan Joselevich (Kranzes) | So what's there to check that it's just /$sha256? | 13:14:27 |
trofi | "^/[A-Za-z0-9]{52}.*" | 13:18:42 |
trofi | Proposed the nixpkgs workaround as https://github.com/NixOS/nixpkgs/pull/377007 | 15:38:08 |
Ilan Joselevich (Kranzes) | Ngl i kinda dislike it | 15:39:57 |
Ilan Joselevich (Kranzes) | It gets rid of a lot of strictness just to support an experimental feature that almost nobody uses and that is implemented pretty badly | 15:40:42 |
Ilan Joselevich (Kranzes) | You shouldn't punish the vast majority of nix users just because CA paths are represented stupidly | 15:41:20 |
emily | why are they not rooted in the store anyway? | 16:05:17 |
emily | using a path that might exist, in a namespace not owned by Nix, seems weird. | 16:05:29 |
trofi | They are invalid paths anyway :) | 16:16:51 |
@aloisw:julia0815.de | In reply to @emilazy:matrix.org using a path that might exist, in a namespace not owned by Nix, seems weird. If they are unpredictable, they're very unlikely to exist. | 17:19:04 |
@aloisw:julia0815.de | (Unlike, say /__corepkgs__ if you really want to fool Nix.) | 17:19:18 |
emily | do I want to know what /__corepkgs__ is for? | 18:10:22 |
jade_ | In reply to @emilazy:matrix.org do I want to know what /__corepkgs__ is for? hack for implementing <nix/fetchurl.nix> being resolved | 18:19:03 |
emily | ew. | 18:19:16 |
jade_ | we can probably deprecate it or implement it some other way eventually but yeah :/ | 18:20:08 |
jade_ | it's kind of the least of the problems in the evaluator | 18:20:23 |
puck | In reply to @emilazy:matrix.org using a path that might exist, in a namespace not owned by Nix, seems weird. it's /, followed by the nixbase32 encoding of sha256(nix-upstream-output:{store path hash of the drv}:{drv name}{"-" + output name, if not "out"}); i'm not really sure why it's /-prefixed when e.g. builtins.placeholder isn't | 18:37:43 |
emily | huh. builtins.placeholder "x" is /-prefixed for me. I never realized it used that format though | 18:38:17 |
puck | oh, wait, dangit, yeah, it is | 18:38:29 |
puck | oops | 18:38:35 |
puck | i assume it's to avoid accidentally matching the middle of a path string? but still | 18:39:05 |
puck | 22d6e31fc6a9de2ee424984e629ccd2e394ba512, gives no clear reason as to why, so who knows | 19:22:12 |
| 29 Jan 2025 |
| matthewcroughan @fosdem changed their display name from matthewcroughan to matthewcroughan (already in Brussels). | 14:12:37 |
| rieschla joined the room. | 17:44:01 |