!lTqhfnNvIkcEackxxk:matrix.org

Nix Bindings

71 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

You have reached the beginning of time (for this room).


SenderMessageTime
10 May 2024
@farcaller:hdev.imfarcaller

is nix path supposed to always be absolute? i.e. is there any condition under which nix_init_path_string would allow a local path? the docs (https://sourcegraph.com/github.com/NixOS/nix@cb7224a8c2cc3aaee086d1e1ae539d7bb9a68915/-/blob/src/libexpr-c/nix_api_value.h?L316) don't specify that, but the only test (https://sourcegraph.com/github.com/NixOS/nix@cb7224a8c2cc3aaee086d1e1ae539d7bb9a68915/-/blob/tests/unit/libexpr/nix_api_value.cc?L115) checks the absolute path. Previously, the code would accept ./foo/bar as a valid path and return it as such. It doesn't, anymore.

I'd expect it to always resolve to absolute path (just like nix repl does), but then the logic of setting the rootFS (https://sourcegraph.com/github.com/NixOS/nix@cb7224a8c2cc3aaee086d1e1ae539d7bb9a68915/-/blob/src/libexpr/eval.cc?L400) evades me. How is that resolved in the bindings?

13:04:23
@farcaller:hdev.imfarcaller ^ /cc Marcus re https://github.com/farcaller/gonix/pull/2#issuecomment-2104499115 (nope, the current behavior doesn't make sense to me either) 13:06:06
@farcaller:hdev.imfarcallernever mind, I think this is already tracked by https://github.com/NixOS/nix/issues/1061313:15:42
14 May 2024
@infinisil:matrix.orginfinisil changed their profile picture.17:45:10
22 May 2024
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.15:25:52
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.15:28:07

Show newer messages


Back to Room ListRoom Version: 10