Unverified Commit b0b7dbb2 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

Merge pull request #309698 from atorres1985-contrib/castxml

Castxml: update
parents 52b35c58 ea98d5db
Loading
Loading
Loading
Loading
+28 −22
Original line number Diff line number Diff line
{ 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;
  };
})
+0 −2
Original line number Diff line number Diff line
@@ -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 { };