-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
53 lines (45 loc) · 1.52 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
45
46
47
48
49
50
51
52
53
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-filter.url = "github:numtide/nix-filter";
};
outputs = { self, flake-utils, nixpkgs, nix-filter }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; };
ocamlPackages = pkgs.ocamlPackages;
in with ocamlPackages; rec {
defaultPackage = buildDunePackage {
pname = "cerise-interpreter";
version = "0.0.0";
duneVersion = "3";
src = with nix-filter.lib;
nix-filter {
root = ./.;
include = [
"dune-project"
(inDirectory "src")
(inDirectory "lib")
(inDirectory "tests")
];
};
nativeBuildInputs = [ menhir ];
buildInputs = [ containers notty zarith ];
checkInputs = [ alcotest ];
doCheck = true;
meta = with pkgs.lib; {
description =
"Cerise interpreter, interpreter for capability machines";
homepage = "https://github.com/logsem/cerise-interpreter";
license = licenses.bsd3;
};
};
devShell = pkgs.mkShell {
packages = (with defaultPackage; [ buildInputs nativeBuildInputs ])
++ [ merlin ocaml-lsp ocamlformat ];
inputsFrom = [ defaultPackage ];
};
formatter = pkgs.nixfmt;
});
}