alt-ergo: ensure compatibility with Menhir ≥ 20211215

This commit is contained in:
Vincent Laporte 2022-05-29 15:05:27 +02:00 committed by Vincent Laporte
parent 0a91054a94
commit 1b95daa381

View file

@ -1,4 +1,4 @@
{ fetchFromGitHub, lib, which, ocamlPackages }:
{ fetchFromGitHub, fetchpatch, lib, which, ocamlPackages }:
let
pname = "alt-ergo";
@ -10,13 +10,11 @@ let
rev = version;
sha256 = "0hglj1p0753w2isds01h90knraxa42d2jghr35dpwf9g8a1sm9d3";
};
useDune2 = true;
in
let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
pname = "alt-ergo-lib";
inherit version src useDune2;
inherit version src;
configureFlags = [ pname ];
nativeBuildInputs = [ which ];
buildInputs = with ocamlPackages; [ dune-configurator ];
@ -25,7 +23,7 @@ let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
pname = "alt-ergo-parsers";
inherit version src useDune2;
inherit version src;
configureFlags = [ pname ];
nativeBuildInputs = [ which ocamlPackages.menhir ];
propagatedBuildInputs = [ alt-ergo-lib ] ++ (with ocamlPackages; [ camlzip psmt2-frontend ]);
@ -33,7 +31,13 @@ let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
ocamlPackages.buildDunePackage {
inherit pname version src useDune2;
inherit pname version src;
# Ensure compatibility with Menhir ≥ 20211215
patches = fetchpatch {
url = "https://github.com/OCamlPro/alt-ergo/commit/0f9c45af352657c3aec32fca63d11d44f5126df8.patch";
sha256 = "sha256:0zaj3xbk2s8k8jl0id3nrhdfq9mv0n378cbawwx3sziiizq7djbg";
};
configureFlags = [ pname ];