btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / ot / ott / package.nix
blob73de6373e8f057fac427544c6e262c5563a122a1
1 { lib, stdenv, fetchFromGitHub, pkg-config, ocamlPackages, opaline }:
3 stdenv.mkDerivation rec {
4   pname = "ott";
5   version = "0.33";
7   src = fetchFromGitHub {
8     owner = "ott-lang";
9     repo = "ott";
10     rev = version;
11     hash = "sha256-GzeEiok5kigcmfqf/K/UxvlKkl55zy0vOyiRZ2HyMiE=";
12   };
15   strictDeps = true;
17   nativeBuildInputs = [ pkg-config opaline ] ++ (with ocamlPackages; [ findlib ocaml ]);
18   buildInputs = with ocamlPackages; [ ocamlgraph ];
20   installTargets = "ott.install";
22   postInstall = ''
23     opaline -prefix $out
24   ''
25   # There is `emacsPackages.ott-mode` for this now.
26   + ''
27     rm -r $out/share/emacs
28   '';
30   meta = {
31     description = "Tool for the working semanticist";
32     mainProgram = "ott";
33     longDescription = ''
34       Ott is a tool for writing definitions of programming languages and
35       calculi. It takes as input a definition of a language syntax and
36       semantics, in a concise and readable ASCII notation that is close to
37       what one would write in informal mathematics. It generates LaTeX to
38       build a typeset version of the definition, and Coq, HOL, and Isabelle
39       versions of the definition. Additionally, it can be run as a filter,
40       taking a LaTeX/Coq/Isabelle/HOL source file with embedded (symbolic)
41       terms of the defined language, parsing them and replacing them by
42       target-system terms.
43     '';
44     homepage = "http://www.cl.cam.ac.uk/~pes20/ott";
45     license = lib.licenses.bsd3;
46     maintainers = with lib.maintainers; [ jwiegley ];
47     platforms = lib.platforms.unix;
48   };