Pantograph/flake.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

2023-10-20 11:52:09 -07:00
{
description = "Pantograph";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
2024-03-28 00:06:35 -07:00
lean.url = "github:leanprover/lean4?ref=b4caee80a3dfc5c9619d88b16c40cc3db90da4e2";
2023-10-20 11:52:09 -07:00
};
outputs = inputs @ {
self,
nixpkgs,
flake-parts,
lean,
...
} : flake-parts.lib.mkFlake { inherit inputs; } {
flake = {
};
systems = [
"x86_64-linux"
"x86_64-darwin"
];
perSystem = { system, pkgs, ... }: let
leanPkgs = lean.packages.${system};
project = leanPkgs.buildLeanPackage {
name = "Pantograph";
roots = [ "Main" "Pantograph" ];
src = ./.;
};
2024-03-28 00:06:35 -07:00
test = leanPkgs.buildLeanPackage {
name = "Test";
roots = [ "Main" ];
src = ./Test;
};
2023-10-20 11:52:09 -07:00
in rec {
2024-03-06 15:26:35 -08:00
packages = {
inherit (leanPkgs) lean lean-all;
inherit (project) sharedLib executable;
default = project.executable;
2023-10-20 11:52:09 -07:00
};
2024-03-28 00:06:35 -07:00
checks = {
test = test.executable;
};
2023-10-20 11:52:09 -07:00
devShells.default = project.devShell;
};
};
}