test-srcs: apply nixpkgs-fmt

This commit is contained in:
Daiderd Jordan 2020-11-07 19:15:53 +01:00
parent 6449f71ef8
commit 502f1dd627
No known key found for this signature in database
GPG key ID: D02435D05B810C96
5 changed files with 19 additions and 20 deletions

View file

@ -1,25 +1,26 @@
let let
builder = builtins.storePath <ofborg-test-bash>; builder = builtins.storePath <ofborg-test-bash>;
in { in
{
success = derivation { success = derivation {
name = "success"; name = "success";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; printf '1\n2\n3\n4\n'; echo ${toString builtins.currentTime} > $out" ]; args = [ "-c" "echo hi; printf '1\n2\n3\n4\n'; echo ${toString builtins.currentTime} > $out" ];
}; };
failed = derivation { failed = derivation {
name = "failed"; name = "failed";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime}" ]; args = [ "-c" "echo hi; echo ${toString builtins.currentTime}" ];
}; };
sandbox-violation = derivation { sandbox-violation = derivation {
name = "sandbox-violation"; name = "sandbox-violation";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime} > $out" ]; args = [ "-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
src = ./../../src; src = ./../../src;
}; };
} }

View file

@ -1,20 +1,19 @@
let let
builder = builtins.storePath <ofborg-test-bash>; builder = builtins.storePath <ofborg-test-bash>;
in in
{ {
success = derivation { success = derivation {
name = "success"; name = "success";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime} > $out" ]; args = [ "-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
}; };
failed = derivation { failed = derivation {
name = "failed"; name = "failed";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime}" ]; args = [ "-c" "echo hi; echo ${toString builtins.currentTime}" ];
}; };
sandbox-violation = derivation { sandbox-violation = derivation {
@ -22,6 +21,6 @@ in
system = builtins.currentSystem; system = builtins.currentSystem;
src = ./../../src; src = ./../../src;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime} > $out" ]; args = [ "-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
}; };
} }

View file

@ -1,11 +1,11 @@
let let
fetchGit = builtins.fetchGit or (path: assert builtins.trace '' fetchGit = builtins.fetchGit or (path: assert builtins.trace ''
error: access to path '/fake' is forbidden in restricted mode error: access to path '/fake' is forbidden in restricted mode
'' false; path); ''
false; path);
builder = builtins.storePath <ofborg-test-bash>; builder = builtins.storePath <ofborg-test-bash>;
in in
{ nixpkgs ? fetchGit /fake }: { nixpkgs ? fetchGit /fake }:
rec { rec {
@ -13,31 +13,32 @@ rec {
name = "success"; name = "success";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime} > $out" ]; args = [ "-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
}; };
failed = derivation { failed = derivation {
name = "failed"; name = "failed";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime}; echo ${success}" ]; args = [ "-c" "echo hi; echo ${toString builtins.currentTime}; echo ${success}" ];
}; };
passes-instantiation = derivation { passes-instantiation = derivation {
name = "passes-instantiation"; name = "passes-instantiation";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo this ones cool" ]; args = [ "-c" "echo this ones cool" ];
}; };
nixpkgs-restricted-mode = derivation { nixpkgs-restricted-mode = derivation {
name = "nixpkgs-restricted-mode-fetchgit"; name = "nixpkgs-restricted-mode-fetchgit";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString nixpkgs} > $out" ]; args = [ "-c" "echo hi; echo ${toString nixpkgs} > $out" ];
}; };
fails-instantiation = assert builtins.trace '' fails-instantiation = assert builtins.trace ''
You just can't frooble the frozz on this particular system. You just can't frooble the frozz on this particular system.
'' false; {}; ''
false; { };
} }

View file

@ -1,19 +1,18 @@
let let
builder = builtins.storePath <ofborg-test-bash>; builder = builtins.storePath <ofborg-test-bash>;
in in
rec { rec {
success = derivation { success = derivation {
name = "success"; name = "success";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime} > $out" ]; args = [ "-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
}; };
failed = derivation { failed = derivation {
name = "failed"; name = "failed";
system = builtins.currentSystem; system = builtins.currentSystem;
inherit builder; inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime}; echo ${success}" ]; args = [ "-c" "echo hi; echo ${toString builtins.currentTime}; echo ${success}" ];
}; };
} }

View file

@ -1,6 +1,5 @@
{ ... }: { ... }:
{ {
lib = import ./lib; lib = import ./lib;
foo.bar.packageA = { foo.bar.packageA = { };
};
} }