Compare commits
10 Commits
sequence-d
...
fix-codeco
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57d24da0df | ||
|
|
7317761670 | ||
|
|
87a1e876cc | ||
|
|
449729d54e | ||
|
|
a61d719a69 | ||
|
|
42c9fa4579 | ||
|
|
0da2585c3f | ||
|
|
8e24a2cb63 | ||
|
|
e3fd1382e9 | ||
|
|
31d8f4d773 |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Update package database
|
||||
run: sudo apt -y update
|
||||
- name: Install deps
|
||||
@@ -51,5 +51,7 @@ jobs:
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: coverage-src.info
|
||||
disable_search: true
|
||||
name: clang-uml
|
||||
fail_ci_if_error: true
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: false
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -33,6 +33,10 @@ coverage*.info
|
||||
packaging/_BUILD
|
||||
packaging/conda/meta.yaml
|
||||
|
||||
#nix
|
||||
.direnv/
|
||||
result
|
||||
|
||||
# CLion
|
||||
|
||||
.idea/
|
||||
|
||||
@@ -107,6 +107,7 @@ if(APPLE)
|
||||
set(YAML_CPP_LIBRARY_DIR ${HOMEBREW_PREFIX}/lib)
|
||||
endif(PKG_CONFIG_FOUND)
|
||||
elseif(MSVC)
|
||||
find_package(yaml-cpp REQUIRED)
|
||||
set(YAML_CPP_LIBRARIES "yaml-cpp")
|
||||
else()
|
||||
find_package(yaml-cpp REQUIRED)
|
||||
|
||||
@@ -81,6 +81,11 @@ else(LINK_LLVM_SHARED)
|
||||
if(${LLVM_PACKAGE_VERSION} VERSION_GREATER_EQUAL "16.0")
|
||||
list(APPEND LIBTOOLING_LIBS clangASTMatchers)
|
||||
endif()
|
||||
if(MSVC)
|
||||
if(${LLVM_PACKAGE_VERSION} VERSION_GREATER_EQUAL "18.1")
|
||||
list(APPEND LIBTOOLING_LIBS clangAPINotes)
|
||||
endif()
|
||||
endif(MSVC)
|
||||
endif(LINK_LLVM_SHARED)
|
||||
|
||||
if("${LIBTOOLING_LIBS}" STREQUAL "")
|
||||
|
||||
@@ -53,6 +53,23 @@ conda config --set channel_priority strict
|
||||
conda install -c bkryza/label/clang-uml clang-uml
|
||||
```
|
||||
|
||||
#### nix
|
||||
|
||||
```bash
|
||||
git clone https://github.com/bkryza/clang-uml
|
||||
|
||||
# To build using nix flakes
|
||||
nix --extra-experimental-features 'nix-command flakes' build
|
||||
|
||||
# or without nix flakes
|
||||
nix-build -E 'with import <nixpkgs> { }; callPackage ./packaging/nix { }'
|
||||
```
|
||||
|
||||
Or if you have flake enabled, you can also directly run
|
||||
```bash
|
||||
nix run github:bkryza/clang-uml
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
Download and run the latest Windows installer from
|
||||
|
||||
45
flake.lock
generated
Normal file
45
flake.lock
generated
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712014858,
|
||||
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1712163089,
|
||||
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
|
||||
"path": "/nix/store/n2g5cqwv8qf5p6vjxny6pg3blbdij12k-source",
|
||||
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
34
flake.nix
Normal file
34
flake.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
description = "C++ UML diagram generator based on Clang";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs";
|
||||
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {flake-parts, ...} @ inputs:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
||||
|
||||
perSystem = {
|
||||
self',
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
packages = {
|
||||
default = self'.packages.clang-uml;
|
||||
clang-uml = pkgs.callPackage ./packaging/nix {};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
inputsFrom = [self'.packages.clang-uml];
|
||||
};
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
};
|
||||
};
|
||||
}
|
||||
30
packaging/nix/default.nix
Normal file
30
packaging/nix/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
stdenv,
|
||||
cmake,
|
||||
pkg-config,
|
||||
installShellFiles,
|
||||
libclang,
|
||||
libllvm,
|
||||
yaml-cpp,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "clang-uml";
|
||||
src = ../..;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libclang
|
||||
libllvm
|
||||
yaml-cpp
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --bash $src/packaging/autocomplete/clang-uml
|
||||
installShellCompletion --zsh $src/packaging/autocomplete/_clang-uml
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user