Skip to content

Commit bc4c04d

Browse files
authoredNov 23, 2018
Revert " eval-checker: use explicit 'nixpkgs' argument for release.nix expressions"
1 parent da43bc0 commit bc4c04d

File tree

3 files changed

+2
-53
lines changed

3 files changed

+2
-53
lines changed
 

‎ofborg/src/nix.rs

+1-20
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ mod tests {
675675
}
676676

677677
#[test]
678-
fn instantiation_success() {
678+
fn instantiation() {
679679
let ret: Result<File, File> = nix().safely(
680680
Operation::Instantiate,
681681
passing_eval_path().as_path(),
@@ -693,23 +693,4 @@ mod tests {
693693
],
694694
);
695695
}
696-
697-
#[test]
698-
fn instantiation_nixpkgs_restricted_mode() {
699-
let ret: Result<File, File> = nix().safely(
700-
Operation::Instantiate,
701-
individual_eval_path().as_path(),
702-
vec![String::from("-A"), String::from("nixpkgs-restricted-mode")],
703-
true,
704-
);
705-
706-
assert_run(
707-
ret,
708-
Expect::Fail,
709-
vec![
710-
"access to path '/fake'",
711-
"is forbidden in restricted mode",
712-
],
713-
);
714-
}
715696
}

‎ofborg/src/tasks/massrebuilder.rs

-15
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
348348
"nixos-options",
349349
nix::Operation::Instantiate,
350350
vec![
351-
String::from("--arg"),
352-
String::from("nixpkgs"),
353-
String::from("./."),
354351
String::from("./nixos/release.nix"),
355352
String::from("-A"),
356353
String::from("options"),
@@ -362,9 +359,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
362359
"nixos-manual",
363360
nix::Operation::Instantiate,
364361
vec![
365-
String::from("--arg"),
366-
String::from("nixpkgs"),
367-
String::from("./."),
368362
String::from("./nixos/release.nix"),
369363
String::from("-A"),
370364
String::from("manual"),
@@ -376,9 +370,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
376370
"nixpkgs-manual",
377371
nix::Operation::Instantiate,
378372
vec![
379-
String::from("--arg"),
380-
String::from("nixpkgs"),
381-
String::from("./."),
382373
String::from("./pkgs/top-level/release.nix"),
383374
String::from("-A"),
384375
String::from("manual"),
@@ -390,9 +381,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
390381
"nixpkgs-tarball",
391382
nix::Operation::Instantiate,
392383
vec![
393-
String::from("--arg"),
394-
String::from("nixpkgs"),
395-
String::from("./."),
396384
String::from("./pkgs/top-level/release.nix"),
397385
String::from("-A"),
398386
String::from("tarball"),
@@ -404,9 +392,6 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
404392
"nixpkgs-unstable-jobset",
405393
nix::Operation::Instantiate,
406394
vec![
407-
String::from("--arg"),
408-
String::from("nixpkgs"),
409-
String::from("./."),
410395
String::from("./pkgs/top-level/release.nix"),
411396
String::from("-A"),
412397
String::from("unstable"),

‎ofborg/test-srcs/eval-mixed-failure/default.nix

+1-18
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
let
2-
fetchGit = builtins.fetchGit or (path: assert builtins.trace ''
3-
error: access to path '/fake' is forbidden in restricted mode
4-
'' false; path);
5-
62
nix = import <nix/config.nix>;
7-
in
8-
9-
{ nixpkgs ? fetchGit /fake }:
10-
11-
rec {
3+
in rec {
124
success = derivation {
135
name = "success";
146
system = builtins.currentSystem;
@@ -36,15 +28,6 @@ rec {
3628
"echo this ones cool" ];
3729
};
3830

39-
nixpkgs-restricted-mode = derivation {
40-
name = "nixpkgs-restricted-mode-fetchgit";
41-
system = builtins.currentSystem;
42-
builder = nix.shell;
43-
args = [
44-
"-c"
45-
"echo hi; echo ${toString nixpkgs} > $out" ];
46-
};
47-
4831
fails-instantiation = assert builtins.trace ''
4932
You just can't frooble the frozz on this particular system.
5033
'' false; {};

0 commit comments

Comments
 (0)