2019-06-16 19:59:06 +00:00
|
|
|
{ version, src, stdenv, ocaml, findlib, ocamlbuild, ... }:
|
2015-11-11 11:24:42 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "menhir";
|
|
|
|
inherit version;
|
2015-11-11 11:24:42 +00:00
|
|
|
|
2018-10-27 16:41:18 +00:00
|
|
|
inherit src;
|
2015-11-11 11:24:42 +00:00
|
|
|
|
2016-10-08 06:44:25 +00:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ];
|
2015-11-11 11:24:42 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
preBuild = ''
|
2016-08-29 01:28:15 +00:00
|
|
|
# fix makefiles.
|
2015-11-11 11:24:42 +00:00
|
|
|
RM=$(type -p rm)
|
|
|
|
CHMOD=$(type -p chmod)
|
2016-08-29 01:28:15 +00:00
|
|
|
for f in src/Makefile demos/OMakefile* demos/Makefile*
|
2015-11-11 11:24:42 +00:00
|
|
|
do
|
|
|
|
substituteInPlace $f \
|
|
|
|
--replace /bin/rm $RM \
|
2016-08-29 01:28:15 +00:00
|
|
|
--replace /bin/chmod $CHMOD
|
2015-11-11 11:24:42 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
export PREFIX=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://pauillac.inria.fr/~fpottier/menhir/;
|
|
|
|
description = "A LR(1) parser generator for OCaml";
|
|
|
|
longDescription = ''
|
|
|
|
Menhir is a LR(1) parser generator for the Objective Caml programming
|
|
|
|
language. That is, Menhir compiles LR(1) grammar specifications down
|
|
|
|
to OCaml code. Menhir was designed and implemented by François Pottier
|
|
|
|
and Yann Régis-Gianas.
|
|
|
|
'';
|
|
|
|
license = with licenses; [
|
2017-04-20 20:16:35 +00:00
|
|
|
(if versionAtLeast version "20170418" then gpl2 else qpl) /* generator */
|
2015-11-11 11:24:42 +00:00
|
|
|
lgpl2 /* library */
|
|
|
|
];
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2015-11-11 11:24:42 +00:00
|
|
|
maintainers = with maintainers; [ z77z ];
|
|
|
|
};
|
|
|
|
}
|