2023-02-02 18:25:31 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, ocamlPackages, opaline }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ott";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.33";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ott-lang";
|
|
|
|
repo = "ott";
|
|
|
|
rev = version;
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-GzeEiok5kigcmfqf/K/UxvlKkl55zy0vOyiRZ2HyMiE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config opaline ] ++ (with ocamlPackages; [ findlib ocaml ]);
|
|
|
|
buildInputs = with ocamlPackages; [ ocamlgraph ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
installTargets = "ott.install";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
opaline -prefix $out
|
|
|
|
''
|
|
|
|
# There is `emacsPackages.ott-mode` for this now.
|
|
|
|
+ ''
|
|
|
|
rm -r $out/share/emacs
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "A tool for the working semanticist";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
|
|
|
Ott is a tool for writing definitions of programming languages and
|
|
|
|
calculi. It takes as input a definition of a language syntax and
|
|
|
|
semantics, in a concise and readable ASCII notation that is close to
|
|
|
|
what one would write in informal mathematics. It generates LaTeX to
|
|
|
|
build a typeset version of the definition, and Coq, HOL, and Isabelle
|
|
|
|
versions of the definition. Additionally, it can be run as a filter,
|
|
|
|
taking a LaTeX/Coq/Isabelle/HOL source file with embedded (symbolic)
|
|
|
|
terms of the defined language, parsing them and replacing them by
|
|
|
|
target-system terms.
|
|
|
|
'';
|
|
|
|
homepage = "http://www.cl.cam.ac.uk/~pes20/ott";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ jwiegley ];
|
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|