2023-03-22 07:42:02 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
tests/test-derivation: allow tests to be modules
Use `mkTestDerivationFromNixvimModule` instead of `mkTestDerivation`,
allowing "proper" modules to be used instead of plain attr configs.
This is useful for more complex tests that wish to use `config` or
`options` arguments, e.g:
```nix
{config, options, ...}: {
/* some cool test */
}
```
To allow `tests.dontRun` to be defined on such a test, the module is
allowed to be nested as `module`, e.g:
```nix
{
tests.dontRun = true;
module = {config, options, ...}: {
/* a disabled test */
};
}
```
Also ended up doing some general cleanup, removing an unused function,
etc.
2024-06-29 20:16:16 +01:00
|
|
|
pkgsUnfree,
|
2024-10-18 09:44:59 +01:00
|
|
|
helpers,
|
|
|
|
lib,
|
|
|
|
system,
|
|
|
|
self, # The flake instance
|
2023-03-22 07:42:02 +01:00
|
|
|
}:
|
|
|
|
let
|
2024-10-18 09:44:59 +01:00
|
|
|
inherit (self.legacyPackages.${system})
|
|
|
|
makeNixvimWithModule
|
|
|
|
nixvimConfiguration
|
|
|
|
;
|
2024-07-19 20:22:19 +02:00
|
|
|
in
|
2024-10-18 09:44:59 +01:00
|
|
|
{
|
|
|
|
extra-args-tests = import ./extra-args.nix {
|
|
|
|
inherit pkgs;
|
|
|
|
inherit makeNixvimWithModule;
|
|
|
|
};
|
|
|
|
extend = import ./extend.nix { inherit pkgs makeNixvimWithModule; };
|
|
|
|
extra-files = import ./extra-files.nix { inherit pkgs makeNixvimWithModule; };
|
|
|
|
enable-except-in-tests = import ./enable-except-in-tests.nix {
|
|
|
|
inherit pkgs makeNixvimWithModule;
|
|
|
|
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
|
|
|
|
};
|
|
|
|
failing-tests = pkgs.callPackage ./failing-tests.nix {
|
|
|
|
inherit (self.lib.${system}.check) mkTestDerivationFromNixvimModule;
|
|
|
|
};
|
|
|
|
no-flake = import ./no-flake.nix {
|
|
|
|
inherit system;
|
|
|
|
inherit (self.lib.${system}.check) mkTestDerivationFromNvim;
|
|
|
|
nixvim = "${self}";
|
|
|
|
};
|
|
|
|
lib-tests = import ./lib-tests.nix {
|
|
|
|
inherit pkgs helpers;
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
};
|
|
|
|
maintainers = import ./maintainers.nix { inherit pkgs; };
|
|
|
|
plugins-by-name = pkgs.callPackage ./plugins-by-name.nix { inherit nixvimConfiguration; };
|
|
|
|
generated = pkgs.callPackage ./generated.nix { };
|
|
|
|
package-options = pkgs.callPackage ./package-options.nix { inherit nixvimConfiguration; };
|
|
|
|
lsp-all-servers = pkgs.callPackage ./lsp-servers.nix { inherit nixvimConfiguration; };
|
|
|
|
}
|
|
|
|
# Tests generated from ./test-sources
|
|
|
|
# Grouped as a number of link-farms in the form { test-1, test-2, ... test-N }
|
|
|
|
// import ./main.nix {
|
|
|
|
inherit
|
|
|
|
lib
|
|
|
|
pkgs
|
|
|
|
pkgsUnfree
|
|
|
|
helpers
|
|
|
|
;
|
|
|
|
}
|