-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9e80d5
commit f7fc2cf
Showing
5 changed files
with
143 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
(lang dune 2.0) | ||
(using menhir 2.0) | ||
(lang dune 3.4) | ||
(using menhir 2.1) | ||
(name cerise-interpreter) | ||
|
||
; https://dune.readthedocs.io/en/stable/concepts.html#package-specification | ||
(package | ||
(name cerise-interpreter) | ||
(synopsis "Interpreter for Cerise capability machine")) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
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 = [ | ||
ocaml-lsp | ||
merlin | ||
ocamlformat | ||
]; | ||
|
||
inputsFrom = [defaultPackage]; | ||
}; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
(library | ||
(name libinterp) | ||
(libraries zarith notty notty.unix containers)) | ||
(libraries containers notty notty.unix zarith)) | ||
|
||
(ocamllex lexer lexer_regfile) | ||
(menhir (modules parser parser_regfile) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,6 @@ | ||
(executable | ||
(name interpreter) | ||
(public_name cerise-interpreter) | ||
(modules interpreter) | ||
(libraries libinterp notty notty.unix containers)) | ||
|
||
(executable | ||
(name awkward_ucaps) | ||
(modules awkward_ucaps) | ||
(libraries libinterp)) | ||
|
||
(executable | ||
(name awkward_dcaps) | ||
(modules awkward_dcaps) | ||
(libraries libinterp)) | ||
; (libraries containers libinterp notty notty.unix)) | ||
(libraries containers libinterp notty)) |