summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/menhir
diff options
context:
space:
mode:
authorMarco Maggesi <maggesi@math.unifi.it>2010-12-09 15:40:04 +0000
committerMarco Maggesi <maggesi@math.unifi.it>2010-12-09 15:40:04 +0000
commitac457478e35e56e7370e3e40167e5df75de98363 (patch)
treefcbfe2bb58b8e32bbb60c0c4e25e069139e73ceb /pkgs/development/ocaml-modules/menhir
parent114fa21c481f0c9b52f4e7a2915bffbdfb61467e (diff)
downloadnixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar
nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.gz
nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.bz2
nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.lz
nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.xz
nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.tar.zst
nixpkgs-ac457478e35e56e7370e3e40167e5df75de98363.zip
* Add ocaml packages findlib, camlzip, ocaml-ssl, ocaml-batteries, menhir, camomile, ocaml-lwt, cryptokit, ocaml-cryptgps, ounit, ocaml-react
svn path=/nixpkgs/trunk/; revision=25041
Diffstat (limited to 'pkgs/development/ocaml-modules/menhir')
-rw-r--r--pkgs/development/ocaml-modules/menhir/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/menhir/default.nix b/pkgs/development/ocaml-modules/menhir/default.nix
new file mode 100644
index 00000000000..7c1a2bfe829
--- /dev/null
+++ b/pkgs/development/ocaml-modules/menhir/default.nix
@@ -0,0 +1,47 @@
+{stdenv, fetchurl, ocaml, findlib}:
+
+let
+  ocaml_version = (builtins.parseDrvName ocaml.name).version;
+  version = "20090505";
+in
+
+stdenv.mkDerivation {
+  name = "menhir-${version}";
+
+  src = fetchurl {
+    url = "http://pauillac.inria.fr/~fpottier/menhir/menhir-${version}.tar.gz";
+    sha256 = "1dsy80wp7k9wbxc89pjzy2izdkk4b72104m9ik747xzy23mssbyx";
+  };
+
+  buildInputs = [ocaml findlib];
+
+  configurePhase = "true";	# Skip configure
+
+  preBuild = ''
+    #Fix makefiles.
+    RM=$(type -p rm)
+    CHMOD=$(type -p chmod)
+    ENV=$(type -p env)
+    for f in src/Makefile demos/OMakefile* demos/Makefile* demos/ocamldep.wrapper
+    do
+      substituteInPlace $f \
+        --replace /bin/rm $RM \
+	--replace /bin/chmod $CHMOD \
+	--replace /usr/bin/env $ENV
+    done
+
+    export PREFIX=$out
+  '';
+
+  meta = {
+    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 = "QPL,LGPL+linking exceptions";
+  };
+}