mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
Allows using the `callPackage(s)` pattern on tests. Rather than using `pkgs.callPackage`, we implement our own variant using `lib.callPackageWith`. Our variant (`callTest`) includes additional nixvim-specific stuff commonly used by our tests.
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{
|
|
pkgs,
|
|
pkgsUnfree,
|
|
helpers,
|
|
lib,
|
|
system,
|
|
self, # The flake instance
|
|
}:
|
|
let
|
|
autoArgs = pkgs // {
|
|
inherit
|
|
helpers
|
|
lib
|
|
pkgsUnfree
|
|
self
|
|
system
|
|
;
|
|
inherit (self.legacyPackages.${system})
|
|
makeNixvimWithModule
|
|
nixvimConfiguration
|
|
;
|
|
inherit (self.lib.${system}.check)
|
|
mkTestDerivationFromNvim
|
|
mkTestDerivationFromNixvimModule
|
|
;
|
|
# Recursive:
|
|
inherit callTest callTests;
|
|
};
|
|
|
|
callTest = lib.callPackageWith autoArgs;
|
|
callTests = lib.callPackagesWith autoArgs;
|
|
in
|
|
{
|
|
extra-args-tests = callTest ./extra-args.nix { };
|
|
extend = callTest ./extend.nix { };
|
|
extra-files = callTest ./extra-files.nix { };
|
|
enable-except-in-tests = callTest ./enable-except-in-tests.nix { };
|
|
failing-tests = callTest ./failing-tests.nix { };
|
|
no-flake = callTest ./no-flake.nix { };
|
|
lib-tests = callTest ./lib-tests.nix { };
|
|
maintainers = callTest ./maintainers.nix { };
|
|
plugins-by-name = callTest ./plugins-by-name.nix { };
|
|
generated = callTest ./generated.nix { };
|
|
package-options = callTest ./package-options.nix { };
|
|
lsp-all-servers = callTest ./lsp-servers.nix { };
|
|
}
|
|
# Tests generated from ./test-sources
|
|
# Grouped as a number of link-farms in the form { test-1, test-2, ... test-N }
|
|
// callTests ./main.nix { }
|