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
builder = builtins.storePath <ofborg-test-bash>;
in {
in
{
success = derivation {
name = "success";
system = builtins.currentSystem;
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 {
name = "failed";
system = builtins.currentSystem;
inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime}" ];
args = [ "-c" "echo hi; echo ${toString builtins.currentTime}" ];
};
sandbox-violation = derivation {
name = "sandbox-violation";
system = builtins.currentSystem;
inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
args = [ "-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
src = ./../../src;
};
}

View file

@ -1,20 +1,19 @@
let
builder = builtins.storePath <ofborg-test-bash>;
in
{
success = derivation {
name = "success";
system = builtins.currentSystem;
inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
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}" ];
args = [ "-c" "echo hi; echo ${toString builtins.currentTime}" ];
};
sandbox-violation = derivation {
@ -22,6 +21,6 @@ in
system = builtins.currentSystem;
src = ./../../src;
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
fetchGit = builtins.fetchGit or (path: assert builtins.trace ''
error: access to path '/fake' is forbidden in restricted mode
'' false; path);
''
false; path);
builder = builtins.storePath <ofborg-test-bash>;
in
{ nixpkgs ? fetchGit /fake }:
rec {
@ -13,31 +13,32 @@ rec {
name = "success";
system = builtins.currentSystem;
inherit builder;
args = ["-c" "echo hi; echo ${toString builtins.currentTime} > $out" ];
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}" ];
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" ];
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" ];
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; {};
''
false; { };
}

View file

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

View file

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