diff --git a/doc/meta.xml b/doc/meta.xml
index a7e467a78cb..3abfe016d70 100644
--- a/doc/meta.xml
+++ b/doc/meta.xml
@@ -255,6 +255,17 @@ meta.platforms = stdenv.lib.platforms.linux;
tests
+
+
+ This attribute is special in that it is not actually under the
+ meta attribute set but rather under the
+ passthru attribute set. This is due to a current
+ limitation of Nix, and will change as soon as Nixpkgs will be able to
+ depend on a new enough version of Nix. See
+ the relevant
+ issue for more details.
+
+
An attribute set with as values tests. A test is a derivation, which
builds successfully when the test passes, and fails to build otherwise. A
@@ -269,7 +280,7 @@ meta.platforms = stdenv.lib.platforms.linux;
{ /* ... */, nixosTests }:
{
# ...
- meta.tests = {
+ passthru.tests = {
basic-functionality-and-dovecot-integration = nixosTests.opensmtpd;
};
}
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 0d6dc48c9d6..718a95dadd2 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -2,7 +2,7 @@
# The return value of this function will be an attrset with arbitrary depth and
# the `anything` returned by callTest at its test leafs.
# The tests not supported by `system` will be replaced with `{}`, so that
-# `meta.tests` can contain links to those without breaking on architectures
+# `passthru.tests` can contain links to those without breaking on architectures
# where said tests are unsupported.
# Example callTest that just extracts the derivation from the test:
# callTest = t: t.test;
diff --git a/pkgs/servers/mail/dovecot/default.nix b/pkgs/servers/mail/dovecot/default.nix
index af1184a973b..f80a01e20f8 100644
--- a/pkgs/servers/mail/dovecot/default.nix
+++ b/pkgs/servers/mail/dovecot/default.nix
@@ -68,11 +68,8 @@ stdenv.mkDerivation rec {
description = "Open source IMAP and POP3 email server written with security primarily in mind";
maintainers = with stdenv.lib.maintainers; [ peti rickynils fpletz ];
platforms = stdenv.lib.platforms.unix;
- # https://github.com/NixOS/nixpkgs/issues/50230 must be resolved before
- # this can be enabled.
- #
- # tests = {
- # opensmtpd-interaction = nixosTests.opensmtpd;
- # };
+ };
+ passthru.tests = {
+ opensmtpd-interaction = nixosTests.opensmtpd;
};
}
diff --git a/pkgs/servers/mail/opensmtpd/default.nix b/pkgs/servers/mail/opensmtpd/default.nix
index 5efaca40f6e..695450f1822 100644
--- a/pkgs/servers/mail/opensmtpd/default.nix
+++ b/pkgs/servers/mail/opensmtpd/default.nix
@@ -61,11 +61,8 @@ stdenv.mkDerivation rec {
license = licenses.isc;
platforms = platforms.linux;
maintainers = with maintainers; [ rickynils obadz ekleog ];
- # https://github.com/NixOS/nixpkgs/issues/50230 must be resolved before
- # this can be enabled.
- #
- # tests = {
- # basic-functionality-and-dovecot-interaction = nixosTests.opensmtpd;
- # };
+ };
+ passthru.tests = {
+ basic-functionality-and-dovecot-interaction = nixosTests.opensmtpd;
};
}
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix
index 301080f0f90..d09dff10b27 100644
--- a/pkgs/stdenv/generic/check-meta.nix
+++ b/pkgs/stdenv/generic/check-meta.nix
@@ -166,6 +166,7 @@ let
hydraPlatforms = listOf str;
broken = bool;
# TODO: refactor once something like Profpatsch's types-simple will land
+ # This is currently dead code due to https://github.com/NixOS/nix/issues/2532
tests = attrsOf (mkOptionType {
name = "test";
check = x: x == {} || ( # Accept {} for tests that are unsupported