Threads and Scheduling
1{
2 description = "Declarations for the environment that this project will use.";
3
4 # Flake inputs
5 inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
6
7 # Flake outputs
8 outputs = inputs:
9 let
10 # The systems supported for this flake
11 supportedSystems = [
12 "x86_64-linux" # 64-bit Intel/AMD Linux
13 "aarch64-linux" # 64-bit ARM Linux
14 "x86_64-darwin" # 64-bit Intel macOS
15 "aarch64-darwin" # 64-bit ARM macOS
16 ];
17
18 # Helper to provide system-specific attributes
19 forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f {
20 pkgs = import inputs.nixpkgs { inherit system; };
21 });
22 in
23 {
24 devShells = forEachSupportedSystem ({ pkgs }: {
25 default = pkgs.mkShell {
26 # The Nix packages provided in the environment
27 # Add any you need here
28 packages = with pkgs; [
29 gcc
30 gnumake
31 clang-tools
32 lldb
33 ];
34
35 # Set any environment variables for your dev shell
36 env = { };
37
38 # Add any shell logic you want executed any time the environment is activated
39 shellHook = ''
40 '';
41 };
42 });
43 };
44}