add a check to whenever menhirLib exists

If it does, it add menhirLib as a dependency. Else, ignore it.
This commit is contained in:
Alain 2021-11-29 11:24:03 +01:00
parent d65bf985d9
commit e09db29aa4

View File

@ -1,6 +1,25 @@
{ lib, fetchFromGitHub, buildDunePackage, ansiterminal, sedlex_2, menhir
, menhirLib, unionfind, bindlib, cmdliner, re, zarith, zarith_stubs_js, ocamlgraph
, calendar, visitors, benchmark, js_of_ocaml, js_of_ocaml-ppx, camomile, cppo }:
{ lib
, fetchFromGitHub
, buildDunePackage
, ansiterminal
, sedlex_2
, menhir
, unionfind
, bindlib
, cmdliner
, re
, zarith
, zarith_stubs_js
, ocamlgraph
, calendar
, visitors
, benchmark
, js_of_ocaml
, js_of_ocaml-ppx
, camomile
, cppo
, menhirLib ? null #for nixos-unstable compatibility.
}:
buildDunePackage rec {
pname = "catala";
@ -32,7 +51,7 @@ buildDunePackage rec {
unionfind
bindlib
];
] ++ (if isNull menhirLib then [ ] else [ menhirLib ]);
doCheck = true;
patches = [ ./.nix/no-web.patch ];
@ -44,4 +63,4 @@ buildDunePackage rec {
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}
}