2025-04-01 20:10:43 +02:00
|
|
|
{
|
|
|
|
# The pkgs used for dependencies for the testing itself
|
2020-04-25 22:07:43 +02:00
|
|
|
# Don't test properties of pkgs.lib, but rather the lib in the parent directory
|
2024-02-28 00:04:29 +01:00
|
|
|
system ? builtins.currentSystem,
|
2025-04-01 20:10:43 +02:00
|
|
|
pkgs ? import ../.. { inherit system; } // {
|
|
|
|
lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!";
|
|
|
|
},
|
2024-12-09 20:04:11 +02:00
|
|
|
# For testing someone may edit impure.nix to return cross pkgs, use `pkgsBuildBuild` directly so everything here works.
|
|
|
|
pkgsBB ? pkgs.pkgsBuildBuild,
|
2023-11-09 02:08:44 -08:00
|
|
|
nix ? pkgs-nixVersions.stable,
|
2025-04-01 20:10:43 +02:00
|
|
|
nixVersions ? [
|
|
|
|
pkgs-nixVersions.minimum
|
|
|
|
nix
|
|
|
|
pkgs-nixVersions.latest
|
|
|
|
],
|
2024-12-09 20:04:11 +02:00
|
|
|
pkgs-nixVersions ? import ./nix-for-tests.nix { pkgs = pkgsBB; },
|
2020-04-25 22:07:43 +02:00
|
|
|
}:
|
2015-02-08 22:51:20 +01:00
|
|
|
|
2023-05-26 18:32:38 +02:00
|
|
|
let
|
2023-08-17 00:55:32 +02:00
|
|
|
lib = import ../.;
|
2025-04-01 20:10:43 +02:00
|
|
|
testWithNix =
|
|
|
|
nix:
|
2024-12-09 20:04:11 +02:00
|
|
|
import ./test-with-nix.nix {
|
|
|
|
inherit lib nix;
|
|
|
|
pkgs = pkgsBB;
|
|
|
|
};
|
2023-05-26 18:32:38 +02:00
|
|
|
|
|
|
|
in
|
2025-04-01 20:10:43 +02:00
|
|
|
pkgsBB.symlinkJoin {
|
|
|
|
name = "nixpkgs-lib-tests";
|
2025-05-29 18:30:34 +02:00
|
|
|
paths = map testWithNix nixVersions ++ [
|
|
|
|
(import ./maintainers.nix {
|
|
|
|
inherit pkgs;
|
|
|
|
lib = import ../.;
|
|
|
|
})
|
|
|
|
(import ./teams.nix {
|
|
|
|
inherit pkgs;
|
|
|
|
lib = import ../.;
|
|
|
|
})
|
|
|
|
];
|
2025-04-01 20:10:43 +02:00
|
|
|
}
|