flake_env/lib/flake_env__util.re
Bryan Bennett 6ec3bd2378
Add flake input tracking
and restructure the whole codebase!

Not fully tested due to #4; theoretically resolves #1
2023-12-29 15:34:44 -05:00

10 lines
340 B
ReasonML

open Core;
module Unix = Core_unix;
let nix = (args) => {
let stdout_chan = Unix.open_process_in(
"nix --extra-experimental-features \"nix-command flakes\" " ++ (args |> String.concat));
let stdout_content = stdout_chan |> In_channel.input_all;
let exit_code = Unix.close_process_in(stdout_chan);
(exit_code, stdout_content)
}