significantly improve purity
This commit is contained in:
parent
45a7d43f77
commit
68e9b9a1e4
12 changed files with 139 additions and 230 deletions
|
|
@ -1,8 +1,31 @@
|
|||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
lib ? pkgs.lib,
|
||||
}: lib.makeScope lib.callPackageWith (self: let
|
||||
inherit (pkgs.testers) runNixOSTest;
|
||||
in {
|
||||
basic = runNixOSTest ./basic/test.nix;
|
||||
qpkgs ? let
|
||||
src = fetchTree (builtins.parseFlakeRef "github:Qyriad/nur-packages");
|
||||
in import src { inherit pkgs; },
|
||||
lib ? qpkgs.lib,
|
||||
dynix ? qpkgs.callPackage ../modules-package.nix { },
|
||||
}: let
|
||||
|
||||
runDynixTest = testModule: pkgs.testers.runNixOSTest {
|
||||
imports = [ testModule ];
|
||||
|
||||
# Note: these are arguments to the *test* modules.
|
||||
# Not the NixOS modules for the NixOS configuration the test is testing.
|
||||
# Wew.
|
||||
_module.args = { inherit dynix; };
|
||||
|
||||
# Why is this argument called "extraBaseModule**s**" but take a single module argument...
|
||||
extraBaseModules = { name, ... }: {
|
||||
#imports = [ dynixInjectionModule ];
|
||||
config.environment.systemPackages = [ dynix ];
|
||||
# Just making something in this strict in `name`,
|
||||
# which is only present as an argument for nodes and I don't want to
|
||||
# confuse that with the test modules.
|
||||
config.warnings = builtins.seq name [ ];
|
||||
};
|
||||
};
|
||||
|
||||
in lib.makeScope lib.callPackageWith (self: {
|
||||
basic = runDynixTest ./basic/test.nix;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue