35 lines
895 B
Nix
35 lines
895 B
Nix
{
|
|
description: "A modular Clang C++ development environment";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
treefmt-nix = {
|
|
url = "github:numtide/treefmt-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, treefmt-nix }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
|
|
# Configuration for LLVM/Clang version
|
|
# Change this to "16", "17", "18", or "19" to switch versions
|
|
llvmVersion = "18";
|
|
|
|
nixLib = import ./nix {
|
|
inherit pkgs treefmt-nix llvmVersion;
|
|
};
|
|
in
|
|
{
|
|
devShells.default = nixLib.devShell;
|
|
formatter = nixLib.formatter;
|
|
}
|
|
);
|
|
}
|