tests: move away from string comparisons with stdenv.hostPlatform

This commit is contained in:
Gaetan Lepage 2025-04-21 12:12:00 +02:00 committed by nix-infra-bot
parent d3c9dedbdd
commit 75efaa0a97
2 changed files with 22 additions and 14 deletions

View file

@ -36,6 +36,8 @@ let
...
}:
let
inherit (pkgs.stdenv) hostPlatform;
disabled =
[
# DEPRECATED SERVERS
@ -44,7 +46,7 @@ let
"bufls"
"typst_lsp"
]
++ lib.optionals (pkgs.stdenv.hostPlatform.system == "aarch64-linux") [
++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [
# pkgs.vectorcode is not available on this platform
"vectorcode_server"

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, pkgs, ... }:
{
all-sources =
{ config, ... }:
@ -18,18 +18,24 @@
settings.sources =
with pkgs.lib;
let
disabledSources = [
# We do not provide the required HF_API_KEY environment variable.
"cmp_ai"
# Triggers the warning complaining about treesitter highlighting being disabled
"otter"
# Invokes the `nix` command at startup which is not available in the sandbox
"nixpkgs_maintainers"
# Needs internet access to download `sm-agent`
"supermaven"
# Sometimes get auth error
"codeium"
] ++ optional (pkgs.stdenv.hostPlatform.system == "aarch64-linux") "cmp_tabnine";
inherit (pkgs.stdenv) hostPlatform;
disabledSources =
[
# We do not provide the required HF_API_KEY environment variable.
"cmp_ai"
# Triggers the warning complaining about treesitter highlighting being disabled
"otter"
# Invokes the `nix` command at startup which is not available in the sandbox
"nixpkgs_maintainers"
# Needs internet access to download `sm-agent`
"supermaven"
# Sometimes get auth error
"codeium"
]
++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [
"cmp_tabnine"
];
in
pipe config.cmpSourcePlugins [
# All known source names