mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-04 01:55:11 +02:00
docs/config-examples: generate dynamically from a toml list
This should help to maintain uniformity and hopefully make contributions easier. Kept regression tests local to the derivation, however these are also added to the flake checks.
This commit is contained in:
parent
8eeea073fc
commit
a658e81d71
6 changed files with 361 additions and 56 deletions
|
@ -3,6 +3,7 @@
|
|||
pkgsUnfree,
|
||||
helpers,
|
||||
lib,
|
||||
linkFarm,
|
||||
self, # The flake instance
|
||||
system ? pkgs.stdenv.hostPlatform.system,
|
||||
}:
|
||||
|
@ -29,6 +30,8 @@ let
|
|||
|
||||
callTest = lib.callPackageWith autoArgs;
|
||||
callTests = lib.callPackagesWith autoArgs;
|
||||
|
||||
selfPackages = self.packages.${system};
|
||||
in
|
||||
{
|
||||
extra-args-tests = callTest ./extra-args.nix { };
|
||||
|
@ -44,6 +47,11 @@ in
|
|||
package-options = callTest ./package-options.nix { };
|
||||
lsp-all-servers = callTest ./lsp-servers.nix { };
|
||||
}
|
||||
# Expose some tests from the docs as flake-checks too
|
||||
// lib.optionalAttrs (selfPackages ? docs) {
|
||||
# Individual tests can be run using: nix build .#docs.user-configs.tests.<test>
|
||||
docs-user-configs = linkFarm "user-configs-tests" selfPackages.docs.user-configs.tests;
|
||||
}
|
||||
# Tests generated from ./test-sources
|
||||
# Grouped as a number of link-farms in the form { test-1, test-2, ... test-N }
|
||||
// callTests ./main.nix { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue