@@ -97,7 +97,7 @@ in {
99 components = let
99 components = let
100− componentType = submodule {
100+ componentType = check: submodule {
101 options = {
101 options = {
102 depends = mkOption {
102 depends = mkOption {
103 type = listOfFilteringNulls unspecified;
103 type = listOfFilteringNulls unspecified;
@@ -139,30 +139,38 @@ in {
139 type = bool;
139 type = bool;
140 default = false;
140 default = false;
142+ doCheck = mkOption {
146+ doCrossCheck = mkOption {
148+ default = config.doCrossCheck;
145 library = mkOption {
153 library = mkOption {
146− type = componentType;
154+ type = componentType false;
148 sublibs = mkOption {
156 sublibs = mkOption {
149− type = attrsOf componentType;
157+ type = attrsOf (componentType false);
150 default = {};
158 default = {};
152 foreignlibs = mkOption {
160 foreignlibs = mkOption {
153− type = attrsOf componentType;
161+ type = attrsOf (componentType false);
154 default = {};
162 default = {};
156 exes = mkOption {
164 exes = mkOption {
157− type = attrsOf componentType;
165+ type = attrsOf (componentType false);
158 default = {};
166 default = {};
160 tests = mkOption {
168 tests = mkOption {
161− type = attrsOf componentType;
169+ type = attrsOf (componentType config.doCheck);
162 default = {};
170 default = {};
164 benchmarks = mkOption {
172 benchmarks = mkOption {
165− type = attrsOf componentType;
173+ type = attrsOf (componentType false);
166 default = {};
174 default = {};
@@ -245,5 +253,14 @@ in {
245 type = nullOr string;
253 type = nullOr string;
246 default = null;
254 default = null;
256+ doCheck = mkOption {
260+ doCrossCheck = mkOption {
261+ description = "Run doCheck also in cross compilation settings. This can be tricky as the test logic must know how to run the tests on the target.";