2016-10-08 06:44:25 +00:00
|
|
|
{ version, sha256, stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
|
2015-11-11 11:24:42 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "menhir-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://pauillac.inria.fr/~fpottier/menhir/menhir-${version}.tar.gz";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
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; [
|
|
|
|
qpl /* generator */
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|