Initial commit: Modular Clang C++ Nix environment and problem files

This commit is contained in:
2026-03-14 23:25:02 +08:00
commit f5e7baa1bd
9 changed files with 128 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
{
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;
}
);
}