From 3f86028578172f9add57f29412f2ee54bda812ae Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Mon, 31 Jul 2023 11:45:52 +0800 Subject: [PATCH 1/2] vendor: disable checks on darwin, for Ventura users Fixes: #215 --- default.nix | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 149119fa1..d0e09641c 100644 --- a/default.nix +++ b/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation { env.CXXFLAGS = "-include ${nix.dev}/include/nix/config.h"; - doCheck = true; + doCheck = !stdenv.isDarwin; checkPhase = '' runHook preCheck diff --git a/meson.build b/meson.build index 9c4d71d25..fd5d8c698 100644 --- a/meson.build +++ b/meson.build @@ -35,7 +35,7 @@ boost = dependency('boost') cpp = meson.get_compiler('cpp') backtrace = cpp.find_library('backtrace') -lit = find_program('lit') +lit = find_program('lit', required: false) subdir('lspserver') subdir('nixd') From 2be338120c103794d5e62c50b55a0b86f12a1578 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Mon, 31 Jul 2023 11:55:14 +0800 Subject: [PATCH 2/2] meson: enable test if lit.found() --- nixd/tools/nix-ast-dump/meson.build | 4 +++- nixd/tools/nixd-ast-dump/meson.build | 16 +++++++++------- nixd/tools/nixd/meson.build | 4 +++- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/nixd/tools/nix-ast-dump/meson.build b/nixd/tools/nix-ast-dump/meson.build index 26f80375a..0b1d596ed 100644 --- a/nixd/tools/nix-ast-dump/meson.build +++ b/nixd/tools/nix-ast-dump/meson.build @@ -10,4 +10,6 @@ regression_env = environment() regression_env.append('PATH', meson.current_build_dir()) regression_env.set('MESON_BUILD_ROOT', meson.current_build_dir()) -test('regression/nix-ast-dump', lit, env: regression_env, args: [ '-vv', meson.current_source_dir() + '/test' ], depends: [ nix_ast_dump ] ) +if lit.found() + test('regression/nix-ast-dump', lit, env: regression_env, args: [ '-vv', meson.current_source_dir() + '/test' ], depends: [ nix_ast_dump ] ) +endif diff --git a/nixd/tools/nixd-ast-dump/meson.build b/nixd/tools/nixd-ast-dump/meson.build index 559f5a43d..b6a36e06b 100644 --- a/nixd/tools/nixd-ast-dump/meson.build +++ b/nixd/tools/nixd-ast-dump/meson.build @@ -10,10 +10,12 @@ regression_env = environment() regression_env.append('PATH', meson.current_build_dir()) regression_env.set('MESON_BUILD_ROOT', meson.current_build_dir()) -test('regression/nixd-ast-dump' - , lit - , timeout: 120 - , env: regression_env - , args: [ '-vv', meson.current_source_dir() + '/test' ] - , depends: [ nixd_ast_dump ] - ) +if lit.found() + test('regression/nixd-ast-dump' + , lit + , timeout: 120 + , env: regression_env + , args: [ '-vv', meson.current_source_dir() + '/test' ] + , depends: [ nixd_ast_dump ] + ) +endif diff --git a/nixd/tools/nixd/meson.build b/nixd/tools/nixd/meson.build index c5546aa9d..28fe90769 100644 --- a/nixd/tools/nixd/meson.build +++ b/nixd/tools/nixd/meson.build @@ -15,4 +15,6 @@ regression_env = environment() regression_env.append('PATH', meson.current_build_dir()) regression_env.set('MESON_BUILD_ROOT', meson.current_build_dir()) -test('regression/nixd', lit, env: regression_env, args: [ '-vv', meson.current_source_dir() + '/test' ], depends: [ nixd ] ) +if lit.found() + test('regression/nixd', lit, env: regression_env, args: [ '-vv', meson.current_source_dir() + '/test' ], depends: [ nixd ] ) +endif