!lTqhfnNvIkcEackxxk:matrix.org

Nix Bindings

70 Members
Nix C API https://github.com/NixOS/nix/blob/master/doc/manual/src/c-api.md, language-specific bindings, and their use cases (currently broken link: https://nixos.org/manual/nix/unstable/c-api)19 Servers

Load older messages


SenderMessageTime
22 Oct 2024
@alfredorian:matrix.orgAlfredorian left the room.10:31:05
@o-santi:matrix.orgLeonardo Santiago joined the room.21:53:02
@o-santi:matrix.orgLeonardo Santiagocontinuing the talk in the nix language room22:02:31
@o-santi:matrix.orgLeonardo Santiago Robert Hensing (roberth): is there a commit you'd recommend using for now, where settings are mostly working? I tried using latest from master but I realized most likely it was amidst a refactor because it was missing a flake::initLib() call somewhere in the C API and because of that experimental-features="flakes" wouldn't work no matter what. 22:05:32
@o-santi:matrix.orgLeonardo Santiagoif there isn't, is there any way I can contribute to it? 22:05:46
23 Oct 2024
@o-santi:matrix.orgLeonardo Santiagogoing to try today with latest commit again and see if this problem still persists.13:18:36
@roberthensing:matrix.orgRobert Hensing (roberth)Hi Leonardo, I'm using commit ed129267dcd7dd2cce48c09b17aefd6cfc488bcd in the nixops4 repo13:37:46
@roberthensing:matrix.orgRobert Hensing (roberth) * Hi Leonardo Santiago , I'm using commit ed129267dcd7dd2cce48c09b17aefd6cfc488bcd in the nixops4 repo 13:37:59
@roberthensing:matrix.orgRobert Hensing (roberth)here's the issue for getFlake, https://github.com/NixOS/nix/issues/1139913:39:22
@roberthensing:matrix.orgRobert Hensing (roberth) Maybe John Ericson has ideas for how the C API should be initialized to include libflakes functionality? 13:44:22
@o-santi:matrix.orgLeonardo Santiago
In reply to @o-santi:matrix.org
going to try today with latest commit again and see if this problem still persists.
trace-function-calls is not available in current master either. Should I open an issue for this?
13:48:03
@o-santi:matrix.orgLeonardo Santiago
In reply to @roberthensing:matrix.org
Hi Leonardo Santiago , I'm using commit ed129267dcd7dd2cce48c09b17aefd6cfc488bcd in the nixops4 repo
this was the commit I was using as well, but it was the one that prompted me to send this message as not all settings seem to be available
13:50:28
@o-santi:matrix.orgLeonardo SantiagoI'll try reverting even more to see if older commits still had all settings13:53:11
@o-santi:matrix.orgLeonardo Santiago
In reply to @roberthensing:matrix.org
Maybe John Ericson has ideas for how the C API should be initialized to include libflakes functionality?
I think there are 2 conflicting ideas for the C API, either it should be done through settings or through manual calling nix_libflake_init or something like that
13:55:25
@o-santi:matrix.orgLeonardo Santiago
In reply to @roberthensing:matrix.org
Maybe John Ericson has ideas for how the C API should be initialized to include libflakes functionality?
* I think there are 2 conflicting ideas for the C API, either it should be done through settings or through manual calling nix_libflake_init
13:55:54
@o-santi:matrix.orgLeonardo Santiago the one that seems to make the most sense is to call it automatically when the experimental feature is set with nix_setting_set but that is stateful and might lead to problems as there is no way to "unregister" the getFlake primop if another instance don't want those settings 13:57:33
@o-santi:matrix.orgLeonardo Santiagoof course, that is considering that per-instantiator settings configuration is something that the api is trying to allow13:58:07
@o-santi:matrix.orgLeonardo Santiagowhich seems to the case, given that it is trying to run away from using the same global config for all NixEvalState instances. 14:01:52
@Ericson2314:matrix.orgJohn EricsonI was thinking of making a libflake subclass of the evaluator 19:50:58
@Ericson2314:matrix.orgJohn EricsonWhich would also help 19:51:03
@o-santi:matrix.orgLeonardo SantiagoBut how would that work from an API standpoint?20:43:56
@o-santi:matrix.orgLeonardo Santiago * But how would that work from a C API standpoint?20:44:00
@o-santi:matrix.orgLeonardo Santiago If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? 20:44:55
@drewrypope:matrix.orgDrewry Pope set a profile picture.20:48:33
@o-santi:matrix.orgLeonardo Santiago set a profile picture.21:07:47
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? when calling 'nix_state_crate`? 21:08:22
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? (when calling 'nix_state_crate`?) 21:08:28
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? (when calling nix\_state\_crate\?) 21:08:36
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? (when calling nix_state_crate\?) 21:08:42
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? (when calling nix_state_create?) 21:08:48

Show newer messages


Back to Room ListRoom Version: 10