Skip to content

Commit

Permalink
clang-uml: fix build (#350201)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillrdy authored Oct 22, 2024
2 parents 23ed069 + d9054c2 commit f8e00f2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 29 deletions.
67 changes: 38 additions & 29 deletions pkgs/by-name/cl/clang-uml/package.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{ 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";
Expand All @@ -26,17 +25,27 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-YzHlauVuFLT2PmfqJBNwqQ/P7d7tyl3brk7Vo/kTOF4=";
};

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

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

buildInputs = [
clang
libclang
libllvm
yaml-cpp
Expand All @@ -63,17 +72,17 @@ 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.
The main idea behind the project is to easily maintain up-to-date diagrams within a code-base or document legacy code.
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 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit f8e00f2

Please sign in to comment.