Unverified Commit f8e00f2c authored by kirillrdy's avatar kirillrdy Committed by GitHub
Browse files

clang-uml: fix build (#350201)

parents 23ed0692 d9054c25
Loading
Loading
Loading
Loading
+38 −29
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, stdenv
, cmake
, pkg-config
, installShellFiles
, libclang
, clang
, llvmPackages
, libllvm
, yaml-cpp
, elfutils
, libunwind
, enableLibcxx ? false
, debug ? false
,
{
  lib,
  fetchFromGitHub,
  stdenv,
  cmake,
  pkg-config,
  installShellFiles,
  libclang,
  llvmPackages,
  libllvm,
  yaml-cpp,
  elfutils,
  libunwind,
  enableLibcxx ? false,
  debug ? false,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "clang-uml";
@@ -26,17 +25,27 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-YzHlauVuFLT2PmfqJBNwqQ/P7d7tyl3brk7Vo/kTOF4=";
  };

  nativeBuildInputs = [
  nativeBuildInputs =
    [
      cmake
      pkg-config
      installShellFiles
  ] ++ (if debug then [
    ]
    ++ (
      if debug then
        [
          elfutils
          libunwind
  ] else [ ]);
        ]
      else
        [ ]
    );

  cmakeFlags = [
    "-DCUSTOM_COMPILE_OPTIONS=-Wno-error=sign-compare"
  ];

  buildInputs = [
    clang
    libclang
    libllvm
    yaml-cpp
@@ -63,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: {
  dontFixup = debug;
  dontStrip = debug;

  meta = with lib; {
  meta = {
    description = "Customizable automatic UML diagram generator for C++ based on Clang";
    longDescription = ''
      clang-uml is an automatic C++ to UML class, sequence, package and include diagram generator, driven by YAML configuration files.
@@ -71,9 +80,9 @@ stdenv.mkDerivation (finalAttrs: {
      The configuration file or files for clang-uml define the types and contents of each generated diagram.
      The diagrams can be generated in PlantUML, MermaidJS and JSON formats.
    '';
    maintainers = with maintainers; [ eymeric ];
    maintainers = with lib.maintainers; [ eymeric ];
    homepage = "https://clang-uml.github.io/";
    license = licenses.asl20;
    platforms = platforms.all;
    license = lib.licenses.asl20;
    platforms = lib.platforms.all;
  };
})
+4 −0
Original line number Diff line number Diff line
@@ -450,6 +450,10 @@ with pkgs;
  circt = callPackage ../development/compilers/circt { };
  clang-uml = callPackage ../by-name/cl/clang-uml/package.nix {
    stdenv = clangStdenv;
  };
  classicube = callPackage ../games/classicube { };
  clj-kondo = callPackage ../development/tools/clj-kondo { };