Skip to content

Commit

Permalink
clang-uml: fix --version output
Browse files Browse the repository at this point in the history
by setting cmake flag GIT_VERSION:
bkryza/clang-uml#211
Enable `versionCheckHook` and set `meta.mainProgram`.
  • Loading branch information
zi3m5f committed Oct 23, 2024
1 parent 7dc45cf commit d74ae64
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkgs/by-name/cl/clang-uml/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
yaml-cpp,
elfutils,
libunwind,
versionCheckHook,
enableLibcxx ? false,
debug ? false,
}:
Expand Down Expand Up @@ -43,6 +44,7 @@ stdenv.mkDerivation (finalAttrs: {

cmakeFlags = [
"-DCUSTOM_COMPILE_OPTIONS=-Wno-error=sign-compare"
"-DGIT_VERSION=${finalAttrs.version}"
];

buildInputs = [
Expand Down Expand Up @@ -72,6 +74,10 @@ stdenv.mkDerivation (finalAttrs: {
dontFixup = debug;
dontStrip = debug;

nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgramArg = "--version";

meta = {
description = "Customizable automatic UML diagram generator for C++ based on Clang";
longDescription = ''
Expand All @@ -84,5 +90,6 @@ stdenv.mkDerivation (finalAttrs: {
homepage = "https://clang-uml.github.io/";
license = lib.licenses.asl20;
platforms = lib.platforms.all;
mainProgram = "clang-uml";
};
})

0 comments on commit d74ae64

Please sign in to comment.