From 5ca9831cb101a41192919d876d82b3640d389e50 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 29 May 2021 15:50:56 +0200 Subject: ocamlPackages.menhir: 20190626 → 20210419 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ocamlPackages.menhirLib: init at 20210419 ocamlPackages.menhirSdk: init at 20210419 --- pkgs/development/compilers/compcert/default.nix | 2 +- pkgs/development/compilers/fstar/default.nix | 2 +- pkgs/development/compilers/mezzo/default.nix | 4 +- pkgs/development/compilers/reason/default.nix | 8 ++-- pkgs/development/ocaml-modules/dolmen/default.nix | 6 +-- .../ocaml-modules/earlybird/default.nix | 4 +- pkgs/development/ocaml-modules/menhir/default.nix | 30 +++++++-------- pkgs/development/ocaml-modules/menhir/generic.nix | 43 ---------------------- pkgs/development/ocaml-modules/menhir/lib.nix | 29 +++++++++++++++ pkgs/development/ocaml-modules/menhir/sdk.nix | 15 ++++++++ .../development/ocaml-modules/mustache/default.nix | 6 +-- .../development/tools/analysis/frama-c/default.nix | 4 +- .../tools/ocaml/js_of_ocaml/compiler.nix | 4 +- pkgs/development/tools/ocaml/merlin/4.x.nix | 4 ++ .../tools/ocaml/ocamlformat/generic.nix | 8 ++++ 15 files changed, 91 insertions(+), 78 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/menhir/generic.nix create mode 100644 pkgs/development/ocaml-modules/menhir/lib.nix create mode 100644 pkgs/development/ocaml-modules/menhir/sdk.nix (limited to 'pkgs/development') diff --git a/pkgs/development/compilers/compcert/default.nix b/pkgs/development/compilers/compcert/default.nix index 4e550bac9a6a5..beafd6414f438 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 73bf001f7520c..7abdf132b51e3 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 4c535be4d494c..1710fb986eadf 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 2293c83cc02ca..a65748d06422d 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 a1a73bfe21888..815e1acd72ac5 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 07e9b5a35461e..a6a3648bec65d 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 cbb759205e030..686cf98205801 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 a917d634a19cb..0000000000000 --- 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 0000000000000..3f6660f23ee92 --- /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 0000000000000..0e60849494cc5 --- /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 005e26926d1ad..b16dfd484814e 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 394bd6558fbf0..a10d015e9ff19 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 12306d2a305ab..6965d5fa0abb4 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 77595169565fd..76ef33f7947dc 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 eb38b60f9b154..6f3ce218713e6 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 -- cgit 1.4.1