13 Feb 2025 |
Robert Hensing (roberth) | I've opened https://github.com/NixOS/nix/issues/12470 | 23:57:22 |
14 Feb 2025 |
sodiboo | also, I noticed the equality function does not take a value descriptor for other . I guess that's because most programs won't have multiple external types. I also happen to be using Rust, so ultimately my void* v will be something like dyn Any or a wrapper containing an Any ; so naturally I can use that to check type identity. but it is also possible to load multiple plugins, right? what if several add external types? then I have no idea what the other value has for a type. is the value descriptor checked for equality/identity first? that's the only reasonable way this API makes sense, and it's consistent with the documented behavior of not being equal if the other value is of a primitive type. but it's not documented that the equality does any such check before invoking the callback. | 05:26:15 |
sodiboo | actually, for that matter, it looks like it's impossible to query an external value's type, in general, to check if it belongs to "this library" or not. guess i just have to pray that it is, indeed, part of my library? | 08:10:09 |
Robert Hensing (roberth) | Seems to be just an oversight. I'd be happy to accept PRs for these things, or even issues to track in the C API milestone | 08:53:42 |
sodiboo | yeah i guess that's why it's not like, stable yet, lol. | 09:17:35 |
Robert Hensing (roberth) | The original contributor for the C API tried their best, but their use case did not include externals. We could strip out the externals and call it stable if you prefer, or we could accept the status quo, or we could accept contributions. I think we're going for the latter, but we could change our strategy | 16:21:15 |
15 Feb 2025 |
| BenjB83 joined the room. | 10:16:44 |
| BenjB83 changed their display name from BenjamÃn Buske to BenjB83. | 10:43:21 |
sodiboo | for functions taking a nix_get_string_callback , when they return NIX_OK , is the string callback guaranteed to have been called exactly once, and never again? | 15:41:33 |
Robert Hensing (roberth) | I believe that's the contract yes. I wouldn't rule out multiple calls for sets of strings or something in the future, but that will be clearly documented then | 15:58:51 |
16 Feb 2025 |
| KristijanZic joined the room. | 01:04:36 |
17 Feb 2025 |
| Marcus changed their profile picture. | 21:38:25 |
21 Feb 2025 |
| linj joined the room. | 11:51:44 |
5 Mar 2025 |
| loudgolem joined the room. | 02:41:22 |
17 Mar 2025 |
| @acidbong:envs.net joined the room. | 11:38:50 |
@acidbong:envs.net | afternoon, fellers and felines
i hope this is the right channel to ask: is there a language-agnostic API for Nix daemon or does it require C bindings? i'd love to try to use a different language instead of Nix | 11:44:47 |
Robert Hensing (roberth) | Reimplementations exist, but I don't have recommendations. Using the C API would be possible, but the store layer C API is very minimal at the moment; just enough to supplement the evaluator C API; not much more than the ability to have a Store, a StorePath and build a derivation | 20:31:18 |
@acidbong:envs.net | got it
and I just realized that i'd rather use a transpiler to Nix to do what i want
anyway, thx | 20:34:16 |
| @acidbong:envs.net left the room. | 20:34:22 |
19 Mar 2025 |
Leonardo Santiago | should I be able to copy derivation closures between remote stores without passing through my own local machine? | 12:08:35 |
Leonardo Santiago | I tried doing it through the FFI but it grinds to a halt and never returns | 12:08:52 |
| Sergei Zimmerman (xokdvium) changed their display name from xokdvium to Sergei Zimmerman (xokdvium). | 21:12:16 |
22 Mar 2025 |
| yorickvp joined the room. | 14:18:57 |
yorickvp | in theory yes, in practice I think the copying code does some calls that aren't efficient if both stores are remote | 14:20:54 |
28 Mar 2025 |
Robert Hensing (roberth) | Heads-up regarding libflake initialization breaking in 2.28 https://github.com/roberth/nix/blob/0c75581d8b7cfbfa7a8db9b5dcbf0cbf0709009f/doc/manual/rl-next/c-api-flake-init.md | 18:06:59 |
Robert Hensing (roberth) | I've decided to keep it simple and break this, since the changed solution is a recent addition, and C API progress is slow enough as is. Contributions welcome :) | 18:09:40 |
2 Apr 2025 |
Robert Hensing (roberth) | PR adding exposing flake locking functionality in the C API | 16:17:09 |
4 Apr 2025 |
Robert Hensing (roberth) | rfr ^ | 14:46:50 |
Robert Hensing (roberth) | we don't have a solution for actually loading settings yet | 14:47:30 |
Leonardo Santiago | I'm getting SIGSEGV when calling nix_get_attr_byname with (what it seems to me are) completely valid arguments, that shouldn't even throw an error. | 16:15:40 |