Skip to content

Commit 0d9cfd8

Browse files
committed
Add flake.nix.
1 parent 64efa3b commit 0d9cfd8

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

flake.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
description = "C development environment";
3+
4+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
5+
6+
outputs = { self, nixpkgs }:
7+
let
8+
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
9+
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
10+
in {
11+
devShells = forAllSystems (pkgs: {
12+
default = pkgs.mkShell {
13+
packages = with pkgs; [
14+
clang
15+
clang-tools # clangd, clang-format, etc.
16+
cmake
17+
python3
18+
re2c
19+
];
20+
};
21+
});
22+
};
23+
}

0 commit comments

Comments
 (0)