cleanup nix

Co-authored-by: uku <hi@uku.moe>
This commit is contained in:
eymeric
2024-04-09 17:10:38 +02:00
parent e3fd1382e9
commit 8e24a2cb63
4 changed files with 53 additions and 74 deletions

View File

@@ -1,33 +1,34 @@
{
description = "Description for the project";
description = "C++ UML diagram generator based on Clang";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "nixpkgs";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
outputs = {flake-parts, ...} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
packages.default = config.packages.clang-uml;
packages.clang-uml = pkgs.callPackage packaging/nix/default.nix { };
perSystem = {
self',
pkgs,
...
}: {
packages = {
default = self'.packages.clang-uml;
clang-uml = pkgs.callPackage ./packaging/nix {};
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
# C++ Compiler is already part of stdenv
cmake
llvmPackages_latest.libllvm
yaml-cpp
ccache
elfutils
pkg-config
clang
libclang
];
inputsFrom = [self'.packages.clang-uml];
};
formatter = pkgs.alejandra;
};
};
}