15 Feb 2025 |
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 |
| Acid Bong joined the room. | 11:38:50 |
Acid Bong | 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 |
Acid Bong | 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 |
| Acid Bong 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 |
Leonardo Santiago | This is as much information as I can gather from gdb, as I don't know how to enable debug information on the nix C API, for some reason setting dontStrip = true doesn't work for the nix-{x}-c packages.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6aaee5a in nix::ExprVar::eval(nix::EvalState&, nix::Env&, nix::Value&) ()
from /nix/store/8dlfn55w3b3szqsph1dp2i2jqg0di1gr-nix-expr-2.27.0/lib/libnixexpr.so
| 16:17:55 |
Leonardo Santiago | Not sure how to improve this report, the nix expression is fairly complex and I can't include it, but the program itself should just call eval on an expression from file then access its attributes one by one in a list. I'd like to get some line number information going on but I don't seem to be able to. | 16:20:23 |
Leonardo Santiago | * This is as much information as I can gather from gdb, as I don't know how to enable debug information on the nix C API .so libraries, for some reason setting dontStrip = true doesn't work for the nix-{x}-c packages.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6aaee5a in nix::ExprVar::eval(nix::EvalState&, nix::Env&, nix::Value&) ()
from /nix/store/8dlfn55w3b3szqsph1dp2i2jqg0di1gr-nix-expr-2.27.0/lib/libnixexpr.so
| 16:20:44 |
Leonardo Santiago | * This is as much information as I can gather from gdb (showing only toplevel, the callstack is 22k calls deep), as I don't know how to enable debug information on the nix C API .so libraries, for some reason setting dontStrip = true doesn't work for the nix-{x}-c packages.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6aaee5a in nix::ExprVar::eval(nix::EvalState&, nix::Env&, nix::Value&) ()
from /nix/store/8dlfn55w3b3szqsph1dp2i2jqg0di1gr-nix-expr-2.27.0/lib/libnixexpr.so
| 19:12:38 |
Robert Hensing (roberth) | Did you use .overrideAllMesonComponents ? | 22:07:19 |
6 Apr 2025 |
Leonardo Santiago | Nope, and not a particular weird version of nixpkgs. Stable one, tried both with nix 2.25 and now 2.27.0 and both of them showed the same error. | 20:34:29 |
Robert Hensing (roberth) | Hmm ok. For 2.27 you'd need it because of the libraries being separate derivations, but that's not an explanation for the 2.25 behavior fwiw | 22:11:08 |
Robert Hensing (roberth) | 2.27 is worth another try with that method, because it uses a different build system, so it might not have the 2.25 problem | 22:11:56 |