summaryrefslogtreecommitdiffstats
path: root/pkgs/top-level
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@Yahoo.com>2017-02-09 16:09:47 -0500
committerJohn Ericson <Ericson2314@Yahoo.com>2017-04-17 17:13:01 -0400
commit8c99aab3ea4a9ddbd3918282da7861e674b4e7c4 (patch)
tree5c8a663c775e02ad7c7c714d89095f3cd500e0a0 /pkgs/top-level
parentfffcee35f9b2042d4edc5dccb3379972e03ffd84 (diff)
lib: Fix system parsing, and use for doubles lists
The old hard-coded lists are now used to test system parsing. In the process, make an `assertTrue` in release lib for eval tests; also use it in release-cross
Diffstat (limited to 'pkgs/top-level')
-rw-r--r--pkgs/top-level/release-cross.nix4
-rw-r--r--pkgs/top-level/release-lib.nix5
-rw-r--r--pkgs/top-level/release.nix6
3 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix
index c68c7d3721e2..67f3d55fa167 100644
--- a/pkgs/top-level/release-cross.nix
+++ b/pkgs/top-level/release-cross.nix
@@ -47,11 +47,11 @@ in
# cause false negatives.
testEqualOne = path: system: let
f = path: attrs: builtins.toString (lib.getAttrFromPath path (allPackages attrs));
- in assert
+ in assertTrue (
f path { inherit system; }
==
f (["buildPackages"] ++ path) { inherit system crossSystem; };
- true;
+ );
testEqual = path: systems: forAllSupportedSystems systems (testEqualOne path);
diff --git a/pkgs/top-level/release-lib.nix b/pkgs/top-level/release-lib.nix
index a5fdb9522060..edb760939cb3 100644
--- a/pkgs/top-level/release-lib.nix
+++ b/pkgs/top-level/release-lib.nix
@@ -46,6 +46,11 @@ rec {
pkgs_x86_64_cygwin = allPackages { system = "x86_64-cygwin"; };
+ assertTrue = bool:
+ if bool
+ then pkgs.runCommand "evaluated-to-true" {} "touch $out"
+ else pkgs.runCommand "evaluated-to-false" {} "false";
+
/* The working or failing mails for cross builds will be sent only to
the following maintainers, as most package maintainers will not be
interested in the result of cross building a package. */
diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix
index f2feb29f0cd7..2eae99eaef11 100644
--- a/pkgs/top-level/release.nix
+++ b/pkgs/top-level/release.nix
@@ -26,7 +26,7 @@ let
metrics = import ./metrics.nix { inherit pkgs nixpkgs; };
manual = import ../../doc;
- lib-tests = import ../../lib/tests/release.nix { inherit nixpkgs; };
+ lib-tests = import ../../lib/tests/release.nix { inherit nixpkgs supportedSystems scrubJobs; };
unstable = pkgs.releaseTools.aggregate
{ name = "nixpkgs-${jobs.tarball.version}";
@@ -35,7 +35,6 @@ let
[ jobs.tarball
jobs.metrics
jobs.manual
- jobs.lib-tests
jobs.stdenv.x86_64-linux
jobs.stdenv.i686-linux
jobs.stdenv.x86_64-darwin
@@ -62,7 +61,8 @@ let
jobs.git.x86_64-darwin
jobs.mysql.x86_64-darwin
jobs.vim.x86_64-darwin
- ] ++ lib.collect lib.isDerivation jobs.stdenvBootstrapTools;
+ ] ++ lib.collect lib.isDerivation jobs.stdenvBootstrapTools
+ ++ lib.collect lib.isDerivation jobs.lib-tests;
};
} // (lib.optionalAttrs (builtins.elem "i686-linux" supportedSystems) {
stdenvBootstrapTools.i686-linux =