1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-16 14:01:10 +01:00

tests: add all-package-defaults

This commit is contained in:
Gaetan Lepage 2025-09-06 15:27:14 +02:00 committed by Matt Sturgeon
parent dac1623067
commit 7a6d7730d9
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,62 @@
{
lib,
stdenv,
pkgsForTest,
linkFarmFromDrvs,
}:
let
inherit (stdenv) hostPlatform;
# Enable unfree packages
nixvimConfig = lib.nixvim.modules.evalNixvim {
extraSpecialArgs.pkgs = pkgsForTest;
};
disabledTests = [
# 2025-07-25 python313Packages.lsp-tree-sitter is marked as broken
"autotools-language-server"
# 2025-04-01 php-cs-fixer is marked as broken
"php-cs-fixer"
]
++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [
# "tabnine"
"cmp-tabnine"
]
++ lib.optionals hostPlatform.isDarwin [
# xdotool is not available on darwin
"fontpreview"
# Marked as broken
"akku-scheme-langserver"
"muon"
"rubyfmt"
]
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isAarch64) [
# As of 2025-07-25, zig-zlint is failing on aarch64-darwin
"zig-zlint"
];
isEnabled = p: !(builtins.elem (lib.getName p) disabledTests);
isAvailable = lib.meta.availableOn hostPlatform;
in
/*
Collect all derivation-type option defaults in the top-level option set.
NOTE: This doesn't currently recurse into submodule option sets.
*/
lib.pipe nixvimConfig.options [
(lib.collect lib.isOption)
(lib.catAttrs "default")
# Some options throw when not defined
(builtins.filter (p: (builtins.tryEval p).success))
(builtins.filter lib.isDerivation)
(builtins.filter isEnabled)
(builtins.filter isAvailable)
(linkFarmFromDrvs "all-package-defaults")
]

View file

@ -41,6 +41,7 @@ let
selfPackages = self.packages.${system};
misc = {
all-package-defaults = callTest ./all-package-defaults.nix { };
extra-args-tests = callTest ./extra-args.nix { };
extend = callTest ./extend.nix { };
extra-files = callTest ./extra-files.nix { };