git.delta.rocks / jrsonnet / refs/commits / aac7f3854e2a

difftreelog

source

cmds/fleet/src/better_nix_eval.rs740 Bsourcehistory
1//! Wrapper around nix repl, which allows to work on nix code, without relying on2//! nix libexpr. I mean, nix libexpr is good, but until it has no C bindings, this is the royal PITA.34use std::{5	collections::HashMap,6	ffi::{OsStr, OsString},7	fmt::{self, Display},8	path::PathBuf,9	process::Stdio,10	sync::{Arc, OnceLock},11};1213use anyhow::{anyhow, bail, ensure, Context, Result};14use better_command::{ClonableHandler, Handler, NixHandler, NoopHandler};15use futures::StreamExt;16use itertools::Itertools;17use serde::{de::DeserializeOwned, Deserialize, Serialize};18use tokio::{19	io::AsyncWriteExt,20	process::{ChildStderr, ChildStdin, ChildStdout, Command},21	select,22	sync::{mpsc, oneshot, Mutex},23};24use tracing::{debug, error, warn, Level};