Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/ofborg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ea4b7f8aab39
Choose a base ref
...
head repository: NixOS/ofborg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 33258c16c671
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Mar 29, 2020

  1. ofborg: nix: pass rev to nixpkgs

    Hydra seems to have passed in rev all the time, and nixpkgs will soon
    require `rev` to be set.
    
    This initially broke nixpkgs eval in
    NixOS/nixpkgs@5e8545e,
    so we now update ofborg to always pass `rev` when instantiating nixpkgs
    to avoid breaking it.
    flokli committed Mar 29, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    woodruffw William Woodruff
    Copy the full SHA
    29ac8fb View commit details
  2. tasks/eval/nixpkgs: pass in rev, use proper rev and shortrev

    Here, we can easily access the real commit ID, so pass it in instead of
    a bogus rev and shortRev.
    
    Hydra seems to have passed in rev all the time, and nixpkgs will soon
    require `rev` to be set.
    
    This initially broke nixpkgs eval in
    NixOS/nixpkgs@5e8545e,
    so we now update ofborg to always pass `rev` when instantiating nixpkgs
    to avoid breaking it.
    flokli committed Mar 29, 2020
    Copy the full SHA
    5fadddf View commit details

Commits on Mar 30, 2020

  1. Merge pull request #442 from flokli/ofborg-pass-rev

    ofborg: pass rev
    grahamc authored Mar 30, 2020
    Copy the full SHA
    33258c1 View commit details
Showing with 15 additions and 9 deletions.
  1. +2 −2 ofborg/src/nix.rs
  2. +13 −7 ofborg/src/tasks/eval/nixpkgs.rs
4 changes: 2 additions & 2 deletions ofborg/src/nix.rs
Original file line number Diff line number Diff line change
@@ -219,7 +219,7 @@ impl Nix {
args.push(String::from("--arg"));
args.push(String::from("nixpkgs"));
args.push(String::from(
"{ outPath=./.; revCount=999999; shortRev=\"ofborg\"; }",
"{ outPath=./.; revCount=999999; shortRev=\"ofborg\"; rev=\"0000000000000000000000000000000000000000\"; }",
));
}
command.args(args);
@@ -659,7 +659,7 @@ mod tests {
Expect::Pass,
vec![
"./nixos/release.nix",
"--arg nixpkgs { outPath=./.; revCount=999999; shortRev=\"ofborg\"; }",
"--arg nixpkgs { outPath=./.; revCount=999999; shortRev=\"ofborg\"; rev=\"0000000000000000000000000000000000000000\"; }",
],
);
}
20 changes: 13 additions & 7 deletions ofborg/src/tasks/eval/nixpkgs.rs
Original file line number Diff line number Diff line change
@@ -406,6 +406,12 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
}

fn evaluation_checks(&self) -> Vec<EvalChecker> {
// the value that's passed as the nixpkgs arg
let nixpkgs_arg_value = format!(
"{{ outPath=./.; revCount=999999; shortRev=\"{}\"; rev=\"{}\"; }}",
&self.job.pr.head_sha[0..7],
&self.job.pr.head_sha,
);
vec![
EvalChecker::new(
"package-list",
@@ -431,7 +437,7 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("{ outPath=./.; revCount=999999; shortRev=\"ofborg\"; }"),
nixpkgs_arg_value.clone(),
String::from("./nixos/release-combined.nix"),
String::from("-A"),
String::from("tested"),
@@ -444,7 +450,7 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("{ outPath=./.; revCount=999999; shortRev=\"ofborg\"; }"),
nixpkgs_arg_value.clone(),
String::from("./nixos/release.nix"),
String::from("-A"),
String::from("options"),
@@ -457,7 +463,7 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("{ outPath=./.; revCount=999999; shortRev=\"ofborg\"; }"),
nixpkgs_arg_value.clone(),
String::from("./nixos/release.nix"),
String::from("-A"),
String::from("manual"),
@@ -470,7 +476,7 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("{ outPath=./.; revCount=999999; shortRev=\"ofborg\"; }"),
nixpkgs_arg_value.clone(),
String::from("./pkgs/top-level/release.nix"),
String::from("-A"),
String::from("manual"),
@@ -483,7 +489,7 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("{ outPath=./.; revCount=999999; shortRev=\"ofborg\"; }"),
nixpkgs_arg_value.clone(),
String::from("./pkgs/top-level/release.nix"),
String::from("-A"),
String::from("tarball"),
@@ -496,7 +502,7 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("{ outPath=./.; revCount=999999; shortRev=\"ofborg\"; }"),
nixpkgs_arg_value.clone(),
String::from("./pkgs/top-level/release.nix"),
String::from("-A"),
String::from("unstable"),
@@ -509,7 +515,7 @@ impl<'a> EvaluationStrategy for NixpkgsStrategy<'a> {
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("{ outPath=./.; revCount=999999; shortRev=\"ofborg\"; }"),
nixpkgs_arg_value,
String::from("./pkgs/top-level/release.nix"),
String::from("-A"),
String::from("darwin-tested"),