-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
30 lines (28 loc) · 825 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
28
29
30
{
description = "CSCE 611: Operating Systems";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
};
outputs = inputs @ {
self,
nixpkgs,
...
}: let
inherit (nixpkgs) lib;
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
pkgsFor = lib.genAttrs systems (
system: import nixpkgs {inherit system;}
);
forEachSystem = f: lib.genAttrs systems (system: f (pkgsFor.${system} // toolchain.${system}));
toolchain = forEachSystem (pkgs: import ./toolchain {inherit pkgs;});
MPs = forEachSystem (pkgs: import ./MPs.nix {inherit pkgs;});
in {
formatter = forEachSystem (pkgs: pkgs.alejandra);
packages = lib.recursiveUpdate toolchain MPs;
devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;});
};
}