-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
48 lines (42 loc) · 1.22 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
description = "My project templates for various languages";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ flake-parts, treefmt-nix, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ treefmt-nix.flakeModule ];
systems = [
"x86_64-linux"
"aarch64-linux"
];
perSystem =
{ pkgs, ... }:
let
llvmPackages = pkgs.llvmPackages_19;
in
rec {
imports = [ ./nix/treefmt.nix ];
packages = rec {
llvm-api-gen = pkgs.callPackage ./. { stdenv = llvmPackages.stdenv; };
default = llvm-api-gen;
};
devShells.default = (pkgs.mkShell.override { stdenv = llvmPackages.stdenv; }) {
nativeBuildInputs =
packages.llvm-api-gen.nativeBuildInputs
++ (with pkgs; [
just
valgrind
lldb
]);
buildInputs = packages.llvm-api-gen.buildInputs;
};
};
};
}