From 7ea02c461d7ccbd3b4611909e5715a1fee260deb Mon Sep 17 00:00:00 2001 From: Karolis Stasaitis Date: Wed, 5 Aug 2026 16:29:34 +0200 Subject: [PATCH] sv-lang_9: fix build on darwin Include the wrapped clang-tools on darwin so cmake picks up the wrapped clang-scan-deps. The unwrapped clang-scan-deps cannot find the C++20 module headers while scanning dependencies, which broke the build. With the build fixed, unbreak the package on darwin and enable the unit tests on all platforms (they build and pass on darwin now). Co-authored-by: Nils Cremer --- pkgs/by-name/sv/sv-lang_9/package.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/sv/sv-lang_9/package.nix b/pkgs/by-name/sv/sv-lang_9/package.nix index 00097262e32b..82c89ba08910 100644 --- a/pkgs/by-name/sv/sv-lang_9/package.nix +++ b/pkgs/by-name/sv/sv-lang_9/package.nix @@ -7,6 +7,7 @@ cmake, ninja, fmt, + llvmPackages, mimalloc, python3, }: @@ -42,6 +43,10 @@ stdenv.mkDerivation (finalAttrs: { cmake python3 ninja + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # needs the wrapped clang-scan-deps to find the C++20 module headers + llvmPackages.clang-tools ]; strictDeps = true; @@ -54,17 +59,17 @@ stdenv.mkDerivation (finalAttrs: { catch2_3 ]; - # TODO: a mysterious linker error occurs when building the unittests on darwin. - # The error occurs when using catch2_3 in nixpkgs, not when fetching catch2_3 using CMake - doCheck = !stdenv.hostPlatform.isDarwin; + doCheck = true; meta = { description = "SystemVerilog compiler and language services"; homepage = "https://github.com/MikePopoloski/slang"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ sharzy ]; + maintainers = with lib.maintainers; [ + sharzy + carlossless + ]; mainProgram = "slang"; platforms = lib.platforms.all; - broken = stdenv.hostPlatform.isDarwin; }; })