2019-06-16 20:59:06 +01:00
|
|
|
{ version, src, stdenv, ocaml, findlib, ocamlbuild, ... }:
|
2015-11-11 11:24:42 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "menhir";
|
|
|
|
inherit version;
|
2015-11-11 11:24:42 +00:00
|
|
|
|
2018-10-27 17:41:18 +01:00
|
|
|
inherit src;
|
2015-11-11 11:24:42 +00:00
|
|
|
|
2016-10-08 07:44:25 +01:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ];
|
2015-11-11 11:24:42 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
preBuild = ''
|
2016-08-29 02:28:15 +01:00
|
|
|
# fix makefiles.
|
2015-11-11 11:24:42 +00:00
|
|
|
RM=$(type -p rm)
|
|
|
|
CHMOD=$(type -p chmod)
|
2016-08-29 02:28:15 +01: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 02:28:15 +01:00
|
|
|
--replace /bin/chmod $CHMOD
|
2015-11-11 11:24:42 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
export PREFIX=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://pauillac.inria.fr/~fpottier/menhir/";
|
2015-11-11 11:24:42 +00:00
|
|
|
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 21:16:35 +01: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 [];
|
2019-10-07 15:44:58 +01:00
|
|
|
maintainers = with maintainers; [ maggesi ];
|
2015-11-11 11:24:42 +00:00
|
|
|
};
|
|
|
|
}
|