diff options
Diffstat (limited to 'pkgs/by-name/ca/castxml/package.nix')
-rw-r--r-- | pkgs/by-name/ca/castxml/package.nix | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/pkgs/by-name/ca/castxml/package.nix b/pkgs/by-name/ca/castxml/package.nix index 88cbbec87c6d..03a984741211 100644 --- a/pkgs/by-name/ca/castxml/package.nix +++ b/pkgs/by-name/ca/castxml/package.nix @@ -32,29 +32,34 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ] ++ lib.optionals (withManual || withHTML) [ sphinx ]; buildInputs = [ + libclang libffi libxml2 llvm zlib - ] ++ lib.optionals (!stdenv.isDarwin) [ libclang ]; + ]; - cmakeFlags = - [ - (lib.cmakeOptionType "path" "CLANG_RESOURCE_DIR" - "${lib.getLib libclang}/lib/clang/${lib.versions.major libclang.version}" - ) + cmakeFlags = [ + (lib.cmakeOptionType "path" "CLANG_RESOURCE_DIR" + "${lib.getLib libclang}/lib/clang/${lib.versions.major libclang.version}" + ) - (lib.cmakeBool "SPHINX_HTML" withHTML) - (lib.cmakeBool "SPHINX_MAN" withManual) - ] - ++ lib.optionals stdenv.isDarwin [ - (lib.cmakeOptionType "path" "Clang_DIR" "${lib.getDev libclang}/lib/cmake/clang") - ]; + (lib.cmakeBool "SPHINX_HTML" withHTML) + (lib.cmakeBool "SPHINX_MAN" withManual) + ]; doCheck = true; strictDeps = true; + # darwin clang adds `-isysroot` when $SDKROOT is set. this confuses the + # regular expressions for the disabled tests below. + checkPhase = '' + runHook preCheck + ctest -E 'cmd.cc-gnu-(src-cxx|c-src-c)-cmd' -j $NIX_BUILD_CORES + runHook postCheck + ''; + passthru.tests = testers.testVersion { package = finalAttrs.finalPackage; }; meta = { |