forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
49 lines (43 loc) · 1.13 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 = "A template for Nix based C++ project setup.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/23.05";
unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # Add unstable nixpkgs
utils.url = "github:numtide/flake-utils";
utils.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, unstable, ... }@inputs: inputs.utils.lib.eachSystem [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
]
(system:
let
pkgs = import nixpkgs {
inherit system;
};
unstablePkgs = import unstable { # Import unstable packages
inherit system;
};
in
{
devShell = pkgs.mkShell rec {
name = "llvm dev env";
packages = with pkgs; [
# Development Tools
ccache
gdb
cmake
ninja
graphviz
llvmPackages_latest.lldb
pkg-config
unstablePkgs.mold # Use mold from unstable
clang
zlib
];
NIX_LDFLAGS = "-rpath ${pkgs.zlib}/lib";
};
});
}