Merge pull request #309698 from atorres1985-contrib/castxml

Castxml: update
This commit is contained in:
Jörg Thalheim 2024-05-07 08:59:55 +02:00 committed by GitHub
commit b0b7dbb260
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 24 deletions

View File

@ -1,14 +1,16 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, libffi
, libxml2
, zlib
, withManual ? true
, withHTML ? true
, llvmPackages
, python3
{
cmake,
fetchFromGitHub,
lib,
libffi,
libxml2,
llvmPackages,
python3,
stdenv,
zlib,
# Boolean flags
withHTML ? true,
withManual ? true,
}:
let
@ -17,19 +19,20 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "castxml";
version = "0.6.5";
version = "0.6.6";
src = fetchFromGitHub {
owner = "CastXML";
repo = "CastXML";
rev = "v${finalAttrs.version}";
hash = "sha256-r9Emh2KHjANrg+oWeY8Ags3Gd8k3W68J88bAud+AH6I=";
hash = "sha256-icTos9HboZXvojQPX+pRkpBYiZ5SXSMb9XtvRnXNHuo=";
};
nativeBuildInputs = [
cmake
llvm.dev
] ++ lib.optionals (withManual || withHTML) [
(lib.getDev llvm)
]
++ lib.optionals (withManual || withHTML) [
sphinx
];
@ -45,14 +48,17 @@ stdenv.mkDerivation (finalAttrs: {
];
cmakeFlags = [
"-DCLANG_RESOURCE_DIR=${libclang.dev}/"
"-DSPHINX_HTML=${if withHTML then "ON" else "OFF"}"
"-DSPHINX_MAN=${if withManual then "ON" else "OFF"}"
(lib.cmakeOptionType "path" "CLANG_RESOURCE_DIR" "${lib.getDev libclang}")
(lib.cmakeBool "SPHINX_HTML" withHTML)
(lib.cmakeBool "SPHINX_MAN" withManual)
];
# 97% tests passed, 97 tests failed out of 2881
# mostly because it checks command line and nix append -isystem and all
doCheck = false;
strictDeps = true;
# -E exclude 4 tests based on names
# see https://github.com/CastXML/CastXML/issues/90
checkPhase = ''
@ -61,12 +67,12 @@ stdenv.mkDerivation (finalAttrs: {
runHook postCheck
'';
meta = with lib; {
meta = {
homepage = "https://github.com/CastXML/CastXML";
description = "C-family Abstract Syntax Tree XML Output";
license = lib.licenses.asl20;
mainProgram = "castxml";
license = licenses.asl20;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.unix;
};
})

View File

@ -420,8 +420,6 @@ with pkgs;
castget = callPackage ../applications/networking/feedreaders/castget { };
castxml = callPackage ../development/tools/castxml { };
catatonit = callPackage ../applications/virtualization/catatonit { };
catppuccin-catwalk = callPackage ../development/tools/misc/catppuccin-catwalk { };