4
.gitignore
vendored
4
.gitignore
vendored
@@ -33,6 +33,10 @@ coverage*.info
|
|||||||
packaging/_BUILD
|
packaging/_BUILD
|
||||||
packaging/conda/meta.yaml
|
packaging/conda/meta.yaml
|
||||||
|
|
||||||
|
#nix
|
||||||
|
.direnv/
|
||||||
|
result
|
||||||
|
|
||||||
# CLion
|
# CLion
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
|
|||||||
@@ -53,6 +53,23 @@ conda config --set channel_priority strict
|
|||||||
conda install -c bkryza/label/clang-uml clang-uml
|
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
|
#### Windows
|
||||||
|
|
||||||
Download and run the latest Windows installer from
|
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