forked from mit-plv/koika
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
44 lines (38 loc) · 1.44 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
description = "A core language for rule-based hardware design";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
makes.url = "github:fluidattacks/makes/24.02";
nixpkgs.url = "github:nixos/nixpkgs/release-24.05";
};
outputs = { self, flake-parts, makes, nixpkgs, ... } @ inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
# Original flake.outputs attribute set. Everything in this set behaves like
# usual flake outputs.
flake = {
# NOTE: To use this flake, apply the following overlay to nixpkgs and use
# koika from its respective coqPackages_VER attribute set!
# See _module.args.pkgs = ... below for an example!
overlays.default = import ./overlay.nix;
};
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
perSystem = { inputs', self', system, pkgs, ... }: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.self.overlays.default ];
};
checks = {
koika = self.packages.${system}.default.override {
doCheck = true;
};
};
devShells.default = self'.checks.koika;
packages = {
default = self'.packages.coq8_18-koika;
coq8_18-koika = pkgs.coqPackages_8_18.koika;
coqDev-koika = pkgs.coqPackages_koika.koika;
};
apps.makes = inputs'.makes.apps.default;
};
};
}