mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-16 22:51:24 +01:00
Add flake input tracking
and restructure the whole codebase! Not fully tested due to #4; theoretically resolves #1
This commit is contained in:
parent
e3688e207e
commit
6ec3bd2378
7 changed files with 175 additions and 124 deletions
10
lib/flake_env__util.re
Normal file
10
lib/flake_env__util.re
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue