matthewcroughan @fosdem | # See https://nixos.org/manual/nixpkgs/unstable/#tester-invalidateFetcherByDrvHash
# or doc/build-helpers/testers.chapter.md
nixosTest =
let
/*
The nixos/lib/testing-python.nix module, preapplied with arguments that
make sense for this evaluation of Nixpkgs.
*/
nixosTesting = (
import ../../../nixos/lib/testing-python.nix {
inherit (stdenv.hostPlatform) system;
inherit pkgs;
extraConfigurations = [
(
{ lib, ... }:
{
config.nixpkgs.pkgs = lib.mkDefault pkgsLinux;
}
)
];
}
);
in
test:
let
loadedTest = if builtins.typeOf test == "path" then import test else test;
calledTest = lib.toFunction loadedTest pkgs;
in
nixosTesting.simpleTest calledTest;
| 10:43:50 |