restore old files now!

This commit is contained in:
Qyriad 2026-02-16 18:02:39 +01:00
parent 76b5ac628d
commit dfdf027bc6
11 changed files with 1676 additions and 16 deletions

27
src/nixcmd.rs Normal file
View file

@ -0,0 +1,27 @@
#[allow(unused_imports)]
use crate::prelude::*;
#[derive(Debug, Clone, PartialEq, Hash)]
pub(crate) struct NixEvalExpr<E, A> {
pub(crate) expr: E,
pub(crate) attrpath: A,
}
impl<E, A> NixEvalExpr<E, A>
where
E: AsRef<OsStr>,
A: AsRef<OsStr>,
{
pub(crate) fn into_command(self) -> Command {
let mut cmd = Command::new("nix-instantiate");
cmd.arg("--eval")
.arg("--json")
.arg("--strict")
.arg("--expr")
.arg(self.expr)
.arg("-A")
.arg(self.attrpath);
cmd
}
}