1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-25 11:49:40 +01:00
nixvim/tests/all-package-defaults.nix

135 lines
3.1 KiB
Nix

{
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) [
# 2025-09-19 build failure
# https://github.com/NixOS/nixpkgs/pull/444018
"aider.nvim"
# "tabnine"
"cmp-tabnine"
# luajitPackages.neotest is flaky: (temporarily?) disable tests that depend on it
"compiler.nvim"
"neotest-bash"
"neotest-ctest"
"neotest-dart"
"neotest-deno"
"neotest-dotnet"
"neotest-elixir"
"neotest-foundry"
"neotest-go"
"neotest-golang"
"neotest-gradle"
"neotest-gtest"
"neotest-haskell"
"neotest-java"
"neotest-jest"
"neotest-minitest"
"neotest-pest"
"neotest-phpunit"
"neotest-playwright"
"neotest-plenary"
"neotest-python"
"neotest-rspec"
"neotest-rust"
"neotest-scala"
"neotest-testthat"
"neotest-vitest"
"neotest-zig"
"nvim-coverage"
"overseer.nvim"
"rustaceanvim"
]
++ lib.optionals hostPlatform.isDarwin [
# xdotool is not available on darwin
"fontpreview"
# 2025-09-08 build failure
"mint"
# Marked as broken
"akku-scheme-langserver"
"muon"
"rubyfmt"
]
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isx86_64) [
# As of 2024-07-31, dmd is broken on x86_64-darwin
# https://github.com/NixOS/nixpkgs/pull/331373
"dmd"
# 2025-09-16 marked as broken
# https://github.com/NixOS/nixpkgs/pull/440273/commits/e71ade9ba7c5feca1160acb68c643812e14e67f3
"fpc"
# Marked as broken
"mesonlsp"
# No hash for system
"verible"
# 2025-06-24 build failure
"gleam"
# 2024-01-04 build failure
"texlive-combined-medium"
"texlive"
# 2025-09-16 zig/zig-hook is marked as broken
# https://github.com/NixOS/nixpkgs/commit/bc725b12b2595951a3f4b112d59716d30b41001a
"zls"
]
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isAarch64) [
# As of 2025-07-25, zig-zlint is failing on aarch64-darwin
"zig-zlint"
# 2025-09-08, build failure
# https://github.com/NixOS/nixpkgs/pull/441058
"verible"
# 2025-09-08 ttfautohint hangs forever
"texlive-combined-medium"
"texlive"
];
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")
]