Skip to content

Commit

Permalink
Revert " eval-checker: use explicit 'nixpkgs' argument for release.ni…
Browse files Browse the repository at this point in the history
…x expressions"
  • Loading branch information
grahamc committed Nov 23, 2018
1 parent da43bc0 commit bc4c04d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 53 deletions.
21 changes: 1 addition & 20 deletions ofborg/src/nix.rs
Expand Up @@ -675,7 +675,7 @@ mod tests {
}

#[test]
fn instantiation_success() {
fn instantiation() {
let ret: Result<File, File> = nix().safely(
Operation::Instantiate,
passing_eval_path().as_path(),
Expand All @@ -693,23 +693,4 @@ mod tests {
],
);
}

#[test]
fn instantiation_nixpkgs_restricted_mode() {
let ret: Result<File, File> = nix().safely(
Operation::Instantiate,
individual_eval_path().as_path(),
vec![String::from("-A"), String::from("nixpkgs-restricted-mode")],
true,
);

assert_run(
ret,
Expect::Fail,
vec![
"access to path '/fake'",
"is forbidden in restricted mode",
],
);
}
}
15 changes: 0 additions & 15 deletions ofborg/src/tasks/massrebuilder.rs
Expand Up @@ -348,9 +348,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
"nixos-options",
nix::Operation::Instantiate,
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("./."),
String::from("./nixos/release.nix"),
String::from("-A"),
String::from("options"),
Expand All @@ -362,9 +359,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
"nixos-manual",
nix::Operation::Instantiate,
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("./."),
String::from("./nixos/release.nix"),
String::from("-A"),
String::from("manual"),
Expand All @@ -376,9 +370,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
"nixpkgs-manual",
nix::Operation::Instantiate,
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("./."),
String::from("./pkgs/top-level/release.nix"),
String::from("-A"),
String::from("manual"),
Expand All @@ -390,9 +381,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
"nixpkgs-tarball",
nix::Operation::Instantiate,
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("./."),
String::from("./pkgs/top-level/release.nix"),
String::from("-A"),
String::from("tarball"),
Expand All @@ -404,9 +392,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
"nixpkgs-unstable-jobset",
nix::Operation::Instantiate,
vec![
String::from("--arg"),
String::from("nixpkgs"),
String::from("./."),
String::from("./pkgs/top-level/release.nix"),
String::from("-A"),
String::from("unstable"),
Expand Down
19 changes: 1 addition & 18 deletions ofborg/test-srcs/eval-mixed-failure/default.nix
@@ -1,14 +1,6 @@
let
fetchGit = builtins.fetchGit or (path: assert builtins.trace ''
error: access to path '/fake' is forbidden in restricted mode
'' false; path);

nix = import <nix/config.nix>;
in

{ nixpkgs ? fetchGit /fake }:

rec {
in rec {
success = derivation {
name = "success";
system = builtins.currentSystem;
Expand Down Expand Up @@ -36,15 +28,6 @@ rec {
"echo this ones cool" ];
};

nixpkgs-restricted-mode = derivation {
name = "nixpkgs-restricted-mode-fetchgit";
system = builtins.currentSystem;
builder = nix.shell;
args = [
"-c"
"echo hi; echo ${toString nixpkgs} > $out" ];
};

fails-instantiation = assert builtins.trace ''
You just can't frooble the frozz on this particular system.
'' false; {};
Expand Down

0 comments on commit bc4c04d

Please sign in to comment.