summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 90f47cbd25048f5f34fb1183d2578818bd7e2c8f (plain)
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 = "Lean Wayland API for Lean";
  inputs = {
    nixpkgs = {
      url = "github:nixos/nixpkgs/nixpkgs-unstable";
    };
    flake-utils = {
      url = "github:numtide/flake-utils";
    };
  };
  outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
    let
      pkgs = import nixpkgs {
        inherit system;
        config.allowUnsupportedSystem = true; # for macOS
      };
      lean-shell = pkgs.mkShell {
        name = "Lean";
        packages = [ pkgs.lean4 pkgs.wayland pkgs.pkg-config ];
        shellHook = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
          export XDG_RUNTIME_DIR="$(pwd)/server"
        '';
      };
    in {
    devShells = {
      default = lean-shell;
      lean = lean-shell;
    };
  });
}