Files
nixpkgs/lib/tests/release.nix
Wolfgang Walther c6efa35204 lib/tests: don't test with Nix 2.3 anymore
The `nixVersions.minimum` alias has been removed on unstable, so the
TODO is not needed anymore.

The lib tests can't be run with Nix 2.3 anymore, because this version is
not available on unstable anymore - and thus also not in the pinned
nixpkgs that CI is run with.

(cherry picked from commit cc3d2295b6)
2025-08-12 19:22:29 +02:00

49 lines
1.1 KiB
Nix

{
# The pkgs used for dependencies for the testing itself
# Don't test properties of pkgs.lib, but rather the lib in the parent directory
system ? builtins.currentSystem,
pkgs ?
import ../.. {
inherit system;
config = {
permittedInsecurePackages = [ "nix-2.3.18" ];
};
}
// {
lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!";
},
# For testing someone may edit impure.nix to return cross pkgs, use `pkgsBuildBuild` directly so everything here works.
pkgsBB ? pkgs.pkgsBuildBuild,
nix ? pkgs-nixVersions.stable,
nixVersions ? [
pkgs-nixVersions.nix_2_24
nix
pkgs-nixVersions.latest
],
pkgs-nixVersions ? import ./nix-for-tests.nix { pkgs = pkgsBB; },
}:
let
lib = import ../.;
testWithNix =
nix:
import ./test-with-nix.nix {
inherit lib nix;
pkgs = pkgsBB;
};
in
pkgsBB.symlinkJoin {
name = "nixpkgs-lib-tests";
paths = map testWithNix nixVersions ++ [
(import ./maintainers.nix {
inherit pkgs;
lib = import ../.;
})
(import ./teams.nix {
inherit pkgs;
lib = import ../.;
})
];
}