pub mod parser;
pub mod template;
use std::path::Path;
pub fn is_flake_file(path: &Path) -> bool {
let content = match std::fs::read_to_string(path) {
Ok(c) => c,
Err(_) => return false,
};
let has_inputs = content.lines().any(|line| {
let trimmed = line.trim();
trimmed.starts_with("inputs") && trimmed.contains('=')
});
let has_outputs = content.lines().any(|line| {
let trimmed = line.trim();
trimmed.starts_with("outputs") && trimmed.contains('=')
});
has_inputs && has_outputs
}
#[derive(Debug, Clone)]
pub struct LocalPackage {
pub name: String,
pub input_name: Option<String>,
pub input_url: Option<String>,
pub overlay: Option<String>,
pub package_expr: String,
}
#[derive(Debug, Clone)]
pub struct LocalFlake {
pub name: String,
}