forked from the-distro/ofborg
allow safely building a specific file's attrs
This commit is contained in:
parent
75c3a6ddb8
commit
1323890e07
|
@ -27,8 +27,9 @@ impl Nix {
|
|||
};
|
||||
}
|
||||
|
||||
pub fn safely_build_attrs(&self, nixpkgs: &Path, attrs: Vec<String>) -> Result<File,File> {
|
||||
let mut attrargs: Vec<String> = Vec::with_capacity(2 + (attrs.len() * 2));
|
||||
pub fn safely_build_attrs(&self, nixpkgs: &Path, file: &str, attrs: Vec<String>) -> Result<File,File> {
|
||||
let mut attrargs: Vec<String> = Vec::with_capacity(3 + (attrs.len() * 2));
|
||||
attrargs.push(file.to_owned());
|
||||
attrargs.push(String::from("--no-out-link"));
|
||||
attrargs.push(String::from("--keep-going"));
|
||||
for attr in attrs {
|
||||
|
|
|
@ -80,7 +80,9 @@ impl worker::SimpleWorker for BuildWorker {
|
|||
|
||||
let success: bool;
|
||||
let reader: BufReader<File>;
|
||||
match self.nix.safely_build_attrs(refpath.as_ref(), job.attrs.clone()) {
|
||||
match self.nix.safely_build_attrs(refpath.as_ref(),
|
||||
"./default.nix",
|
||||
job.attrs.clone()) {
|
||||
Ok(r) => {
|
||||
success = true;
|
||||
reader = BufReader::new(r);
|
||||
|
|
Loading…
Reference in a new issue