Hello,
I have an application that at times runs nix-store --realize <path> --store daemon
. I would like to replace the pointless fork() + exec() and instead send an RPC to nix daemon directly.
It seems to me that I can do that with nix/src/libstore-c/nix_api_store.h at 5fd799cfa70d22a625bc706a599b6244f654718d · NixOS/nix · GitHub, but I’m a bit at a loss of how to use this. For example, how do I correrctly create and initialize the nix_c_context and Store parameters? What’s the best way to link against the library (there doesn’t seem to be a pkg-config file for libstore)?
Could someone help getting me started? Is there perhaps an example for using this API somewhere?
Thanks!