pass nix to nixpkgs

This commit is contained in:
Graham Christensen 2019-03-22 14:03:19 -04:00
parent 697ce8635a
commit 14ff7b1e62
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
2 changed files with 5 additions and 3 deletions

View file

@ -3,16 +3,18 @@ use ofborg::checkout::CachedProjectCo;
use ofborg::commitstatus::CommitStatus;
use ofborg::evalchecker::EvalChecker;
use ofborg::message::buildjob::BuildJob;
use ofborg::nix::Nix;
use ofborg::tasks::eval::{EvaluationStrategy, StepResult};
use ofborg::tasks::evaluate::update_labels;
use std::path::Path;
pub struct NixpkgsStrategy<'a> {
issue_ref: &'a IssueRef<'a>,
nix: Nix,
}
impl<'a> NixpkgsStrategy<'a> {
pub fn new(issue_ref: &'a IssueRef) -> NixpkgsStrategy<'a> {
Self { issue_ref }
pub fn new(issue_ref: &'a IssueRef, nix: Nix) -> NixpkgsStrategy<'a> {
Self { issue_ref, nix }
}
fn tag_from_title(&self) {

View file

@ -138,7 +138,7 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for EvaluationWorker<E>
let auto_schedule_build_archs: Vec<systems::System>;
let mut evaluation_strategy: Box<eval::EvaluationStrategy> = if job.is_nixpkgs() {
Box::new(eval::NixpkgsStrategy::new(&issue_ref))
Box::new(eval::NixpkgsStrategy::new(&issue_ref, self.nix.clone()))
} else {
Box::new(eval::GenericStrategy::new())
};