ocamlPackages.menhir: 20190626 → 20210419

ocamlPackages.menhirLib: init at 20210419
ocamlPackages.menhirSdk: init at 20210419
This commit is contained in:
Vincent Laporte 2021-05-29 15:50:56 +02:00 committed by Vincent Laporte
parent c3d87595f1
commit 5ca9831cb1
20 changed files with 97 additions and 80 deletions

View file

@ -11,7 +11,7 @@ stdenv.mkDerivation {
}; };
buildInputs = [ dune_2 ] ++ (with ocamlPackages; [ 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"; buildPhase = "dune build --profile=release";

View file

@ -11,7 +11,7 @@ stdenv.mkDerivation {
}; };
buildInputs = with ocamlPackages; [ buildInputs = with ocamlPackages; [
ocaml findlib ocamlgraph zarith menhir ocaml findlib ocamlgraph zarith menhir menhirLib
# Compressed Sessions # Compressed Sessions
# Emacs compilation of why3.el # Emacs compilation of why3.el
emacs emacs

View file

@ -5,7 +5,7 @@
}: }:
let 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"; ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux";
inherit (coqPackages) coq flocq; inherit (coqPackages) coq flocq;
inherit (lib) optional optionalString; inherit (lib) optional optionalString;

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper installShellFiles ]; nativeBuildInputs = [ makeWrapper installShellFiles ];
buildInputs = with ocamlPackages; [ buildInputs = with ocamlPackages; [
z3 ocaml findlib batteries menhir stdint z3 ocaml findlib batteries menhir menhirLib stdint
zarith camlp4 yojson pprint zarith camlp4 yojson pprint
ulex ocaml-migrate-parsetree process ppx_deriving ppx_deriving_yojson ocamlbuild ulex ocaml-migrate-parsetree process ppx_deriving ppx_deriving_yojson ocamlbuild
]; ];

View file

@ -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" if lib.versionAtLeast ocaml.version "4.06"
then throw "mezzo is not available for OCaml ${ocaml.version}" then throw "mezzo is not available for OCaml ${ocaml.version}"
@ -21,7 +21,7 @@ stdenv.mkDerivation {
sha256 = "0yck5r6di0935s3iy2mm9538jkf77ssr789qb06ms7sivd7g3ip6"; 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 # Sets warning 3 as non-fatal
prePatch = lib.optionalString (check-ocaml-version "4.02") '' prePatch = lib.optionalString (check-ocaml-version "4.02") ''

View file

@ -1,5 +1,5 @@
{ lib, stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune_2 { 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 { stdenv.mkDerivation rec {
@ -13,11 +13,11 @@ stdenv.mkDerivation rec {
sha256 = "0m6ldrci1a4j0qv1cbwh770zni3al8qxsphl353rv19f6rblplhs"; 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 buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir }: { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, menhirLib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-dolmen-${version}"; name = "ocaml${ocaml.version}-dolmen-${version}";
@ -10,8 +10,8 @@ stdenv.mkDerivation rec {
sha256 = "1b9mf8p6mic0n76acx8x82hhgm2n40sdv0jri95im65l52223saf"; sha256 = "1b9mf8p6mic0n76acx8x82hhgm2n40sdv0jri95im65l52223saf";
}; };
buildInputs = [ ocaml findlib ocamlbuild ]; buildInputs = [ ocaml findlib ocamlbuild menhir ];
propagatedBuildInputs = [ menhir ]; propagatedBuildInputs = [ menhirLib ];
makeFlags = [ "-C" "src" ]; makeFlags = [ "-C" "src" ];

View file

@ -1,5 +1,5 @@
{ lib, fetchurl, ocaml, buildDunePackage { 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" if lib.versionAtLeast ocaml.version "4.13"
@ -19,7 +19,7 @@ buildDunePackage rec {
sha256 = "1pwzhcr3pw24ra4j4d23vz71h0psz4xkyp7b12l2wl1slxzjbrxa"; 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 = { meta = {
homepage = "https://github.com/hackwaly/ocamlearlybird"; homepage = "https://github.com/hackwaly/ocamlearlybird";

View file

@ -1,15 +1,15 @@
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild { lib, fetchFromGitLab, buildDunePackage
, version ? if lib.versionAtLeast (lib.getVersion ocaml) "4.02" then "20190626" else "20140422" , menhirLib, menhirSdk
}@args: }:
let buildDunePackage rec {
src = fetchurl ( pname = "menhir";
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; }) inherit (menhirLib) version src useDune2;
buildInputs = [ menhirLib menhirSdk ];
meta = menhirSdk.meta // {
description = "A LR(1) parser generator for OCaml";
};
}

View file

@ -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 ];
};
}

View file

@ -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 ];
};
}

View file

@ -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 ];
};
}

View file

@ -1,4 +1,4 @@
{ lib, buildDunePackage, fetchFromGitHub, ezjsonm, menhir, ounit }: { lib, buildDunePackage, fetchFromGitHub, ezjsonm, menhir, menhirLib, ounit }:
buildDunePackage rec { buildDunePackage rec {
pname = "mustache"; pname = "mustache";
@ -11,8 +11,8 @@ buildDunePackage rec {
sha256 = "19v8rk8d8lkfm2rmhdawfgadji6wa267ir5dprh4w9l1sfj8a1py"; sha256 = "19v8rk8d8lkfm2rmhdawfgadji6wa267ir5dprh4w9l1sfj8a1py";
}; };
buildInputs = [ ezjsonm ]; buildInputs = [ ezjsonm menhir ];
propagatedBuildInputs = [ menhir ]; propagatedBuildInputs = [ menhirLib ];
doCheck = true; doCheck = true;
checkInputs = [ ounit ]; checkInputs = [ ounit ];

View file

@ -11,7 +11,7 @@ let
biniou biniou
camlzip camlzip
easy-format easy-format
menhir menhirLib
mlgmpidl mlgmpidl
num num
ocamlgraph ocamlgraph
@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoconf wrapGAppsHook ]; nativeBuildInputs = [ autoconf wrapGAppsHook ];
buildInputs = with ocamlPackages; [ 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 lablgtk coq graphviz zarith apron why3 mlgmpidl doxygen
gdk-pixbuf gdk-pixbuf
]; ];

View file

@ -1,6 +1,6 @@
{ lib, fetchurl, buildDunePackage { lib, fetchurl, buildDunePackage
, ocaml, cmdliner, cppo, yojson, ppxlib , ocaml, cmdliner, cppo, yojson, ppxlib
, menhir , menhir, menhirLib
}: }:
buildDunePackage rec { buildDunePackage rec {
@ -14,7 +14,7 @@ buildDunePackage rec {
}; };
nativeBuildInputs = [ cppo menhir ]; nativeBuildInputs = [ cppo menhir ];
buildInputs = [ cmdliner ]; buildInputs = [ cmdliner menhirLib ];
configurePlatforms = []; configurePlatforms = [];
propagatedBuildInputs = [ yojson ppxlib ]; propagatedBuildInputs = [ yojson ppxlib ];

View file

@ -10,6 +10,8 @@
, dot-merlin-reader , dot-merlin-reader
, jq , jq
, menhir , menhir
, menhirLib
, menhirSdk
}: }:
let let
@ -66,6 +68,8 @@ buildDunePackage {
checkInputs = [ checkInputs = [
jq jq
menhir menhir
menhirLib
menhirSdk
]; ];
meta = with lib; { meta = with lib; {

View file

@ -58,6 +58,8 @@ buildDunePackage {
uutf uutf
fix fix
menhir menhir
menhirLib
menhirSdk
dune-build-info dune-build-info
ocaml-version ocaml-version
# Changed since 0.16.0: # Changed since 0.16.0:
@ -75,6 +77,8 @@ buildDunePackage {
uutf uutf
fix fix
menhir menhir
menhirLib
menhirSdk
dune-build-info dune-build-info
ocaml-version ocaml-version
# Changed since 0.16.0: # Changed since 0.16.0:
@ -93,6 +97,8 @@ buildDunePackage {
uutf uutf
fix fix
menhir menhir
menhirLib
menhirSdk
(ppxlib.override { version = "0.18.0"; }) (ppxlib.override { version = "0.18.0"; })
dune-build-info # lib.versionAtLeast version "0.16.0" dune-build-info # lib.versionAtLeast version "0.16.0"
ocaml-version # lib.versionAtLeast version "0.16.0" ocaml-version # lib.versionAtLeast version "0.16.0"
@ -110,6 +116,8 @@ buildDunePackage {
uutf uutf
fix fix
menhir menhir
menhirLib
menhirSdk
] else [ ] else [
base base
cmdliner cmdliner

View file

@ -59,7 +59,7 @@ stdenv.mkDerivation {
ocamlPackages.xmlm ocamlPackages.ocaml_pcre ocamlPackages.xmlm ocamlPackages.ocaml_pcre
ocamlPackages.camomile ocamlPackages.camomile
ocamlPackages.fdkaac ocamlPackages.fdkaac
ocamlPackages.srt ocamlPackages.sedlex_2 ocamlPackages.menhir ocamlPackages.srt ocamlPackages.sedlex_2 ocamlPackages.menhir ocamlPackages.menhirLib
]; ];
hardeningDisable = [ "format" "fortify" ]; hardeningDisable = [ "format" "fortify" ];

View file

@ -53,7 +53,7 @@ in
nativeBuildInputs = [ ruby dune_2 ]; nativeBuildInputs = [ ruby dune_2 ];
buildInputs = [ camlpdf otfm yojson-with-position ] ++ (with ocamlPackages; [ 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 batteries camlimages core_kernel ppx_deriving uutf omd cppo re
]); ]);

View file

@ -643,6 +643,10 @@ let
menhir = callPackage ../development/ocaml-modules/menhir { }; menhir = callPackage ../development/ocaml-modules/menhir { };
menhirLib = callPackage ../development/ocaml-modules/menhir/lib.nix { };
menhirSdk = callPackage ../development/ocaml-modules/menhir/sdk.nix { };
merlin = merlin =
if lib.versionAtLeast ocaml.version "4.11" if lib.versionAtLeast ocaml.version "4.11"
then callPackage ../development/tools/ocaml/merlin/4.x.nix { } then callPackage ../development/tools/ocaml/merlin/4.x.nix { }