!lTqhfnNvIkcEackxxk:matrix.org

Nix Bindings

69 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)18 Servers

Load older messages


SenderMessageTime
29 May 2025
@o-santi:matrix.orgLeonardo Santiagoor, at least, linking it15:55:24
@roberthensing:matrix.orgRobert Hensing (roberth)correct - an unmodified bindgen, which uses clang as a library internally for code generation, whereas Nix is built with gcc16:23:39
@o-santi:matrix.orgLeonardo Santiagoand how do you make it link with gcc correctly? 16:25:45
@o-santi:matrix.orgLeonardo Santiago I've taken a look at your nci.nix and I thought it might be either the postConfigure script or the NIX_CC_UNWRAPPED part but none of these had any effect 16:26:26
@o-santi:matrix.orgLeonardo Santiago oh, I see the issue, the script seems to be correctly adding gcc into the include path, but it's gcc13, not the one used by nix 16:54:42
@o-santi:matrix.orgLeonardo Santiago and this is because I'm on nixos-24.11 not nixos-unstable! 16:57:00
@o-santi:matrix.orgLeonardo Santiago * and this is because I'm on nixos-24.11 not nixos-unstable, so updating it did not fast forward it enough 16:57:09
@o-santi:matrix.orgLeonardo Santiago finally 16:57:19
@o-santi:matrix.orgLeonardo Santiago * finally it works 16:57:22
@o-santi:matrix.orgLeonardo Santiago now I'm having trouble with libflake-c 19:52:30
@o-santi:matrix.orgLeonardo Santiago for instance, I cannot seem to simply call nix_flake_reference_and_fragment_from_string 19:53:58
@o-santi:matrix.orgLeonardo Santiago

it complains that

Error: nix::MissingExperimentalFeature: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
NixInfo: error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
19:54:45
@o-santi:matrix.orgLeonardo Santiago I imagined this was because I didn't have any NixEvalState associated, as I'm simply trying to parse a flake reference, not evaluate it 19:55:21
@o-santi:matrix.orgLeonardo Santiago * I imagined this was because I didn't have any NixEvalState associated, as I'm simply trying to parse a flake reference, not evaluate it, and thus I didn't call nix_flake_settings_add_to_eval_state_builder 19:55:47
@o-santi:matrix.orgLeonardo Santiago fine, I tried hooking up flake_settings to my existing NixEvalStateBuilder, calling the add_to_eval-state_builder and .... nothing, still the same error 19:57:05
@o-santi:matrix.orgLeonardo Santiago * fine, I tried hooking up flake_settings to my existing NixEvalStateBuilder - even though there's no need when it is just for parsing, but I digress - called the add_to_eval-state_builder and .... nothing, still the same error 19:57:44
@o-santi:matrix.orgLeonardo Santiago calling (the equivalent of) nix_setting_set("extra-experimental-features", "flakes") complains about Error: Key does not exist - and I believe the whole point of the libflake-c is to not need to explicitly set it through this roundabout method anyway 20:00:27
@o-santi:matrix.orgLeonardo Santiago Robert Hensing (roberth): is this supposed to work? is there some setup I need to do before calling flake_reference_and_fragment_from_string? I do not see any libflake_init or anything like that, so I don't quite understand 20:01:44
@o-santi:matrix.orgLeonardo Santiago * fine, I tried hooking up flake_settings to my existing NixEvalStateBuilder - even though there should be no need when it is just for parsing, but I digress - called the add_to_eval-state_builder and .... nothing, still the same error 20:03:00
@o-santi:matrix.orgLeonardo SantiagoI cannot even understand where this error is being thrown from, it is happening when I call that specific function but I don't see anywhere inside it checking for the experimental feature20:08:45
1 Jun 2025
@seanthw:matrix.orgSean Thawe joined the room.23:48:58
4 Jun 2025
@deeok:matrix.org@deeok:matrix.org joined the room.15:21:03
6 Jun 2025
@water-sucks:matrix.orgwatersucksRedacted or Malformed Event16:54:22
7 Jun 2025
@deeok:matrix.org@deeok:matrix.org changed their display name from deeok to matrixrooms.info mod bot (does NOT read/send messages and/or invites; used for checking reported rooms).22:15:14
@deeok:matrix.org@deeok:matrix.org left the room.23:45:10
9 Jun 2025
@sigmasquadron:matrix.orgSigmaSquadron joined the room.13:07:45
10 Jun 2025
@weriomat:matrix.orgweriomat joined the room.17:39:33
24 Jun 2025
@sielicki:matrix.orgsielicki joined the room.21:50:52
30 Jun 2025
@jonhermansen:matrix.org@jonhermansen:matrix.org joined the room.18:12:34
@jonhermansen:matrix.org@jonhermansen:matrix.org left the room.18:15:15

There are no newer messages yet.


Back to Room ListRoom Version: 10