-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
27 lines (23 loc) · 929 Bytes
/
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
{
description = "Basic C++ flake nix";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
# This is the list of architectures that work with this project
systems = [
"x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"
];
perSystem = { config, self', inputs', pkgs, system, ... }: {
# The `callPackage` automatically fills the parameters of the function
# in package.nix with what's inside the `pkgs` attribute.
packages.default = pkgs.callPackage ./packages.nix {stdenv = pkgs.clangStdenv;};
# The `config` variable contains our own outputs, so we can reference
# neighbor attributes like the package we just defined one line earlier.
devShells.default = config.packages.default;
};
};
}