summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2021-05-29 15:50:56 +0200
committerVincent Laporte <vbgl@users.noreply.github.com>2021-06-05 13:38:01 +0200
commit5ca9831cb101a41192919d876d82b3640d389e50 (patch)
tree61939ea1cac995b8fdb7bfe4bec4494ae510fd65
parentc3d87595f101339701fcb63dc6cb962406597fbf (diff)
downloadnixpkgs-5ca9831cb101a41192919d876d82b3640d389e50.tar
nixpkgs-5ca9831cb101a41192919d876d82b3640d389e50.tar.gz
nixpkgs-5ca9831cb101a41192919d876d82b3640d389e50.tar.bz2
nixpkgs-5ca9831cb101a41192919d876d82b3640d389e50.tar.lz
nixpkgs-5ca9831cb101a41192919d876d82b3640d389e50.tar.xz
nixpkgs-5ca9831cb101a41192919d876d82b3640d389e50.tar.zst
nixpkgs-5ca9831cb101a41192919d876d82b3640d389e50.zip
ocamlPackages.menhir: 20190626 → 20210419
ocamlPackages.menhirLib: init at 20210419
ocamlPackages.menhirSdk: init at 20210419
-rw-r--r--pkgs/applications/science/logic/acgtk/default.nix2
-rw-r--r--pkgs/applications/science/logic/why3/default.nix2
-rw-r--r--pkgs/development/compilers/compcert/default.nix2
-rw-r--r--pkgs/development/compilers/fstar/default.nix2
-rw-r--r--pkgs/development/compilers/mezzo/default.nix4
-rw-r--r--pkgs/development/compilers/reason/default.nix8
-rw-r--r--pkgs/development/ocaml-modules/dolmen/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/earlybird/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/menhir/default.nix30
-rw-r--r--pkgs/development/ocaml-modules/menhir/generic.nix43
-rw-r--r--pkgs/development/ocaml-modules/menhir/lib.nix29
-rw-r--r--pkgs/development/ocaml-modules/menhir/sdk.nix15
-rw-r--r--pkgs/development/ocaml-modules/mustache/default.nix6
-rw-r--r--pkgs/development/tools/analysis/frama-c/default.nix4
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix4
-rw-r--r--pkgs/development/tools/ocaml/merlin/4.x.nix4
-rw-r--r--pkgs/development/tools/ocaml/ocamlformat/generic.nix8
-rw-r--r--pkgs/tools/audio/liquidsoap/full.nix2
-rw-r--r--pkgs/tools/typesetting/satysfi/default.nix2
-rw-r--r--pkgs/top-level/ocaml-packages.nix4
20 files changed, 99 insertions, 82 deletions
diff --git a/pkgs/applications/science/logic/acgtk/default.nix b/pkgs/applications/science/logic/acgtk/default.nix
index 1cf08741206..1de21e09f80 100644
--- a/pkgs/applications/science/logic/acgtk/default.nix
+++ b/pkgs/applications/science/logic/acgtk/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
   };
 
   buildInputs = [ dune_2 ] ++ (with ocamlPackages; [
-    ocaml findlib ansiterminal cairo2 cmdliner fmt logs menhir mtime yojson
+    ocaml findlib ansiterminal cairo2 cmdliner fmt logs menhir menhirLib mtime yojson
   ]);
 
   buildPhase = "dune build --profile=release";
diff --git a/pkgs/applications/science/logic/why3/default.nix b/pkgs/applications/science/logic/why3/default.nix
index deb40c74284..c56e5445f0b 100644
--- a/pkgs/applications/science/logic/why3/default.nix
+++ b/pkgs/applications/science/logic/why3/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
   };
 
   buildInputs = with ocamlPackages; [
-    ocaml findlib ocamlgraph zarith menhir
+    ocaml findlib ocamlgraph zarith menhir menhirLib
     # Compressed Sessions
     # Emacs compilation of why3.el
     emacs
diff --git a/pkgs/development/compilers/compcert/default.nix b/pkgs/development/compilers/compcert/default.nix
index 4e550bac9a6..beafd6414f4 100644
--- a/pkgs/development/compilers/compcert/default.nix
+++ b/pkgs/development/compilers/compcert/default.nix
@@ -5,7 +5,7 @@
 }:
 
 let
-  ocaml-pkgs      = with ocamlPackages; [ ocaml findlib menhir ];
+  ocaml-pkgs      = with ocamlPackages; [ ocaml findlib menhir menhirLib ];
   ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux";
   inherit (coqPackages) coq flocq;
   inherit (lib) optional optionalString;
diff --git a/pkgs/development/compilers/fstar/default.nix b/pkgs/development/compilers/fstar/default.nix
index 73bf001f752..7abdf132b51 100644
--- a/pkgs/development/compilers/fstar/default.nix
+++ b/pkgs/development/compilers/fstar/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ makeWrapper installShellFiles ];
 
   buildInputs = with ocamlPackages; [
-    z3 ocaml findlib batteries menhir stdint
+    z3 ocaml findlib batteries menhir menhirLib stdint
     zarith camlp4 yojson pprint
     ulex ocaml-migrate-parsetree process ppx_deriving ppx_deriving_yojson ocamlbuild
   ];
diff --git a/pkgs/development/compilers/mezzo/default.nix b/pkgs/development/compilers/mezzo/default.nix
index 4c535be4d49..1710fb986ea 100644
--- a/pkgs/development/compilers/mezzo/default.nix
+++ b/pkgs/development/compilers/mezzo/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, yojson, ulex, pprint, fix, functory }:
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, menhirLib, yojson, ulex, pprint, fix, functory }:
 
 if lib.versionAtLeast ocaml.version "4.06"
 then throw "mezzo is not available for OCaml ${ocaml.version}"
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
     sha256 = "0yck5r6di0935s3iy2mm9538jkf77ssr789qb06ms7sivd7g3ip6";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild yojson menhir ulex pprint fix functory ];
+  buildInputs = [ ocaml findlib ocamlbuild yojson menhir menhirLib ulex pprint fix functory ];
 
   # Sets warning 3 as non-fatal
   prePatch = lib.optionalString (check-ocaml-version "4.02") ''
diff --git a/pkgs/development/compilers/reason/default.nix b/pkgs/development/compilers/reason/default.nix
index 2293c83cc02..a65748d0642 100644
--- a/pkgs/development/compilers/reason/default.nix
+++ b/pkgs/development/compilers/reason/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune_2
-, fix, menhir, merlin-extend, ppx_tools_versioned, utop, cppo
+, fix, menhir, menhirLib, menhirSdk, merlin-extend, ppx_tools_versioned, utop, cppo
 }:
 
 stdenv.mkDerivation rec {
@@ -13,11 +13,11 @@ stdenv.mkDerivation rec {
     sha256 = "0m6ldrci1a4j0qv1cbwh770zni3al8qxsphl353rv19f6rblplhs";
   };
 
-  nativeBuildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper menhir ];
 
-  propagatedBuildInputs = [ menhir merlin-extend ppx_tools_versioned ];
+  propagatedBuildInputs = [ menhirLib merlin-extend ppx_tools_versioned ];
 
-  buildInputs = [ ocaml findlib dune_2 cppo fix utop menhir ];
+  buildInputs = [ ocaml findlib dune_2 cppo fix utop menhir menhirSdk ];
 
   buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
 
diff --git a/pkgs/development/ocaml-modules/dolmen/default.nix b/pkgs/development/ocaml-modules/dolmen/default.nix
index a1a73bfe218..815e1acd72a 100644
--- a/pkgs/development/ocaml-modules/dolmen/default.nix
+++ b/pkgs/development/ocaml-modules/dolmen/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir }:
+{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, menhirLib }:
 
 stdenv.mkDerivation rec {
   name = "ocaml${ocaml.version}-dolmen-${version}";
@@ -10,8 +10,8 @@ stdenv.mkDerivation rec {
     sha256 = "1b9mf8p6mic0n76acx8x82hhgm2n40sdv0jri95im65l52223saf";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild ];
-  propagatedBuildInputs = [ menhir ];
+  buildInputs = [ ocaml findlib ocamlbuild menhir ];
+  propagatedBuildInputs = [ menhirLib ];
 
   makeFlags = [ "-C" "src" ];
 
diff --git a/pkgs/development/ocaml-modules/earlybird/default.nix b/pkgs/development/ocaml-modules/earlybird/default.nix
index 07e9b5a3546..a6a3648bec6 100644
--- a/pkgs/development/ocaml-modules/earlybird/default.nix
+++ b/pkgs/development/ocaml-modules/earlybird/default.nix
@@ -1,5 +1,5 @@
 { lib, fetchurl, ocaml, buildDunePackage
-, cmdliner, dap, fmt, iter, logs, lru, lwt_ppx, lwt_react, menhir, path_glob, ppx_deriving_yojson
+, cmdliner, dap, fmt, iter, logs, lru, lwt_ppx, lwt_react, menhir, menhirLib, path_glob, ppx_deriving_yojson
 }:
 
 if lib.versionAtLeast ocaml.version "4.13"
@@ -19,7 +19,7 @@ buildDunePackage rec {
     sha256 = "1pwzhcr3pw24ra4j4d23vz71h0psz4xkyp7b12l2wl1slxzjbrxa";
   };
 
-  buildInputs = [ cmdliner dap fmt iter logs lru lwt_ppx lwt_react menhir path_glob ppx_deriving_yojson ];
+  buildInputs = [ cmdliner dap fmt iter logs lru lwt_ppx lwt_react menhir menhirLib path_glob ppx_deriving_yojson ];
 
   meta = {
     homepage = "https://github.com/hackwaly/ocamlearlybird";
diff --git a/pkgs/development/ocaml-modules/menhir/default.nix b/pkgs/development/ocaml-modules/menhir/default.nix
index cbb759205e0..686cf982058 100644
--- a/pkgs/development/ocaml-modules/menhir/default.nix
+++ b/pkgs/development/ocaml-modules/menhir/default.nix
@@ -1,15 +1,15 @@
-{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild
-, version ? if lib.versionAtLeast (lib.getVersion ocaml) "4.02" then "20190626" else "20140422"
-}@args:
-
-let
-  src = fetchurl (
-  if version == "20140422" then { url = "http://cristal.inria.fr/~fpottier/menhir/menhir-20140422.tar.gz"; sha256 = "1ki1f2id6a14h9xpv2k8yb6px7dyw8cvwh39csyzj4qpzx7wia0d"; }
-  else if version == "20170712" then { url = "http://gallium.inria.fr/~fpottier/menhir/menhir-20170712.tar.gz"; sha256 = "006hq3bwj81j67f2k9cgzj5wr4hai8j36925p5n3sd2j01ljsj6a"; }
-  else if version == "20181113" then { url = "https://gitlab.inria.fr/fpottier/menhir/repository/20181113/archive.tar.gz"; sha256 = "0hl611l0gyl7b2bm7m0sk7vjz14m0i7znrnjq3gw58pylj934dx4"; }
-  else if version == "20190626" then { url = "https://gitlab.inria.fr/fpottier/menhir/repository/20190626/archive.tar.gz"; sha256 = "0nigjnskg89knyi2zj1w211mb1pvkrwfqpz9a0qbw80k3hm8gg0h"; }
-  else throw ("menhir: unknown version " ++ version)
-  );
-in
-
-import ./generic.nix (args // { inherit version src; })
+{ lib, fetchFromGitLab, buildDunePackage
+, menhirLib, menhirSdk
+}:
+
+buildDunePackage rec {
+  pname = "menhir";
+
+  inherit (menhirLib) version src useDune2;
+
+  buildInputs = [ menhirLib menhirSdk ];
+
+  meta = menhirSdk.meta // {
+    description = "A LR(1) parser generator for OCaml";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/menhir/generic.nix b/pkgs/development/ocaml-modules/menhir/generic.nix
deleted file mode 100644
index a917d634a19..00000000000
--- a/pkgs/development/ocaml-modules/menhir/generic.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ version, src, lib, stdenv, ocaml, findlib, ocamlbuild, ... }:
-
-stdenv.mkDerivation {
-  pname = "menhir";
-  inherit version;
-
-  inherit src;
-
-  buildInputs = [ ocaml findlib ocamlbuild ];
-
-  createFindlibDestdir = true;
-
-  preBuild = ''
-    # fix makefiles.
-    RM=$(type -p rm)
-    CHMOD=$(type -p chmod)
-    for f in src/Makefile demos/OMakefile* demos/Makefile*
-    do
-      substituteInPlace $f \
-        --replace /bin/rm $RM \
-        --replace /bin/chmod $CHMOD
-    done
-
-    export PREFIX=$out
-  '';
-
-  meta = with 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; [
-      (if versionAtLeast version "20170418" then gpl2 else qpl) /* generator */
-      lgpl2 /* library */
-    ];
-    platforms = ocaml.meta.platforms or [];
-    maintainers = with maintainers; [ maggesi ];
-  };
-}
diff --git a/pkgs/development/ocaml-modules/menhir/lib.nix b/pkgs/development/ocaml-modules/menhir/lib.nix
new file mode 100644
index 00000000000..3f6660f23ee
--- /dev/null
+++ b/pkgs/development/ocaml-modules/menhir/lib.nix
@@ -0,0 +1,29 @@
+{ lib, fetchFromGitLab, buildDunePackage }:
+
+buildDunePackage rec {
+  pname = "menhirLib";
+  version = "20210419";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.inria.fr";
+    owner = "fpottier";
+    repo = "menhir";
+    rev = version;
+    sha256 = "0jcbr7s3iwfr7xxfybs3h407g76yfp5yq5r9i0wg2ahvvbqh03ky";
+  };
+
+  useDune2 = true;
+
+  meta = with lib; {
+    homepage = "http://pauillac.inria.fr/~fpottier/menhir/";
+    description = "Runtime support library for parsers generated by Menhir";
+    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; [ lgpl2Only ];
+    maintainers = with maintainers; [ vbgl ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/menhir/sdk.nix b/pkgs/development/ocaml-modules/menhir/sdk.nix
new file mode 100644
index 00000000000..0e60849494c
--- /dev/null
+++ b/pkgs/development/ocaml-modules/menhir/sdk.nix
@@ -0,0 +1,15 @@
+{ lib, fetchFromGitLab, buildDunePackage
+, menhirLib
+}:
+
+buildDunePackage rec {
+  pname = "menhirSdk";
+
+  inherit (menhirLib) version src useDune2;
+
+  meta = menhirLib.meta // {
+    description = "Compile-time library for auxiliary tools related to Menhir";
+    license = with lib.licenses; [ gpl2Only ];
+  };
+}
+
diff --git a/pkgs/development/ocaml-modules/mustache/default.nix b/pkgs/development/ocaml-modules/mustache/default.nix
index 005e26926d1..b16dfd48481 100644
--- a/pkgs/development/ocaml-modules/mustache/default.nix
+++ b/pkgs/development/ocaml-modules/mustache/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildDunePackage, fetchFromGitHub, ezjsonm, menhir, ounit }:
+{ lib, buildDunePackage, fetchFromGitHub, ezjsonm, menhir, menhirLib, ounit }:
 
 buildDunePackage rec {
   pname = "mustache";
@@ -11,8 +11,8 @@ buildDunePackage rec {
     sha256 = "19v8rk8d8lkfm2rmhdawfgadji6wa267ir5dprh4w9l1sfj8a1py";
   };
 
-  buildInputs = [ ezjsonm ];
-  propagatedBuildInputs = [ menhir ];
+  buildInputs = [ ezjsonm menhir ];
+  propagatedBuildInputs = [ menhirLib ];
 
   doCheck = true;
   checkInputs = [ ounit ];
diff --git a/pkgs/development/tools/analysis/frama-c/default.nix b/pkgs/development/tools/analysis/frama-c/default.nix
index 394bd6558fb..a10d015e9ff 100644
--- a/pkgs/development/tools/analysis/frama-c/default.nix
+++ b/pkgs/development/tools/analysis/frama-c/default.nix
@@ -11,7 +11,7 @@ let
     biniou
     camlzip
     easy-format
-    menhir
+    menhirLib
     mlgmpidl
     num
     ocamlgraph
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ autoconf wrapGAppsHook ];
 
   buildInputs = with ocamlPackages; [
-    ncurses ocaml findlib ltl2ba ocamlgraph yojson menhir camlzip
+    ncurses ocaml findlib ltl2ba ocamlgraph yojson menhirLib camlzip
     lablgtk coq graphviz zarith apron why3 mlgmpidl doxygen
     gdk-pixbuf
   ];
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix
index 12306d2a305..6965d5fa0ab 100644
--- a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix
+++ b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix
@@ -1,6 +1,6 @@
 { lib, fetchurl, buildDunePackage
 , ocaml, cmdliner, cppo, yojson, ppxlib
-, menhir
+, menhir, menhirLib
 }:
 
 buildDunePackage rec {
@@ -14,7 +14,7 @@ buildDunePackage rec {
   };
 
   nativeBuildInputs = [ cppo menhir ];
-  buildInputs = [ cmdliner ];
+  buildInputs = [ cmdliner menhirLib ];
 
   configurePlatforms = [];
   propagatedBuildInputs = [ yojson ppxlib ];
diff --git a/pkgs/development/tools/ocaml/merlin/4.x.nix b/pkgs/development/tools/ocaml/merlin/4.x.nix
index 77595169565..76ef33f7947 100644
--- a/pkgs/development/tools/ocaml/merlin/4.x.nix
+++ b/pkgs/development/tools/ocaml/merlin/4.x.nix
@@ -10,6 +10,8 @@
 , dot-merlin-reader
 , jq
 , menhir
+, menhirLib
+, menhirSdk
 }:
 
 let
@@ -66,6 +68,8 @@ buildDunePackage {
   checkInputs = [
     jq
     menhir
+    menhirLib
+    menhirSdk
   ];
 
   meta = with lib; {
diff --git a/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/pkgs/development/tools/ocaml/ocamlformat/generic.nix
index eb38b60f9b1..6f3ce218713 100644
--- a/pkgs/development/tools/ocaml/ocamlformat/generic.nix
+++ b/pkgs/development/tools/ocaml/ocamlformat/generic.nix
@@ -58,6 +58,8 @@ buildDunePackage {
       uutf
       fix
       menhir
+      menhirLib
+      menhirSdk
       dune-build-info
       ocaml-version
       # Changed since 0.16.0:
@@ -75,6 +77,8 @@ buildDunePackage {
       uutf
       fix
       menhir
+      menhirLib
+      menhirSdk
       dune-build-info
       ocaml-version
       # Changed since 0.16.0:
@@ -93,6 +97,8 @@ buildDunePackage {
       uutf
       fix
       menhir
+      menhirLib
+      menhirSdk
       (ppxlib.override { version = "0.18.0"; })
       dune-build-info # lib.versionAtLeast version "0.16.0"
       ocaml-version # lib.versionAtLeast version "0.16.0"
@@ -110,6 +116,8 @@ buildDunePackage {
       uutf
       fix
       menhir
+      menhirLib
+      menhirSdk
     ] else [
       base
       cmdliner
diff --git a/pkgs/tools/audio/liquidsoap/full.nix b/pkgs/tools/audio/liquidsoap/full.nix
index 81152908451..3d05461121f 100644
--- a/pkgs/tools/audio/liquidsoap/full.nix
+++ b/pkgs/tools/audio/liquidsoap/full.nix
@@ -59,7 +59,7 @@ stdenv.mkDerivation {
       ocamlPackages.xmlm ocamlPackages.ocaml_pcre
       ocamlPackages.camomile
       ocamlPackages.fdkaac
-      ocamlPackages.srt ocamlPackages.sedlex_2 ocamlPackages.menhir
+      ocamlPackages.srt ocamlPackages.sedlex_2 ocamlPackages.menhir ocamlPackages.menhirLib
     ];
 
   hardeningDisable = [ "format" "fortify" ];
diff --git a/pkgs/tools/typesetting/satysfi/default.nix b/pkgs/tools/typesetting/satysfi/default.nix
index 73370eb011e..d18c7fc270e 100644
--- a/pkgs/tools/typesetting/satysfi/default.nix
+++ b/pkgs/tools/typesetting/satysfi/default.nix
@@ -53,7 +53,7 @@ in
     nativeBuildInputs = [ ruby dune_2 ];
 
     buildInputs = [ camlpdf otfm yojson-with-position ] ++ (with ocamlPackages; [
-      ocaml findlib menhir
+      ocaml findlib menhir menhirLib
       batteries camlimages core_kernel ppx_deriving uutf omd cppo re
     ]);
 
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 783a46e6081..1fba7289130 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -643,6 +643,10 @@ let
 
     menhir = callPackage ../development/ocaml-modules/menhir { };
 
+    menhirLib = callPackage ../development/ocaml-modules/menhir/lib.nix { };
+
+    menhirSdk = callPackage ../development/ocaml-modules/menhir/sdk.nix { };
+
     merlin =
       if lib.versionAtLeast ocaml.version "4.11"
       then callPackage ../development/tools/ocaml/merlin/4.x.nix { }