blob: 067c72a3498def89f8bf3444837b1ac335753b24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
let
fetchGit = builtins.fetchGit or (path: assert builtins.trace ''
error: access to path '/fake' is forbidden in restricted mode
''
false; path);
builder = builtins.storePath <ofborg-test-bash>;
in
{ nixpkgs ? fetchGit /fake }:
rec {
success = derivation {
name = "success";
system = builtins.currentSystem;
inherit builder;
args = [ "-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
};
failed = derivation {
name = "failed";
system = builtins.currentSystem;
inherit builder;
args = [ "-c" "echo hi; echo ${toString builtins.currentTime}; echo ${success}" ];
};
passes-instantiation = derivation {
name = "passes-instantiation";
system = builtins.currentSystem;
inherit builder;
args = [ "-c" "echo this ones cool" ];
};
nixpkgs-restricted-mode = derivation {
name = "nixpkgs-restricted-mode-fetchgit";
system = builtins.currentSystem;
inherit builder;
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; { };
}
|