ocamlPackages.js_of_ocaml*: 3.3.0 -> 3.4.0

Ensures compatibility with OCaml 4.08
This commit is contained in:
Vincent Laporte 2019-09-06 16:02:00 +00:00 committed by Vincent Laporte
parent 912f03d0d4
commit 5fed98e862

View File

@ -1,35 +1,26 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, dune { lib, fetchFromGitHub, buildDunePackage
, cmdliner, cppo, yojson , cmdliner, cppo, yojson
}: }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02" buildDunePackage rec {
then throw "js_of_ocaml-compiler is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
pname = "js_of_ocaml-compiler"; pname = "js_of_ocaml-compiler";
version = "3.3.0"; version = "3.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ocsigen"; owner = "ocsigen";
repo = "js_of_ocaml"; repo = "js_of_ocaml";
rev = version; rev = version;
sha256 = "0bg8x2s3f24c8ia2g293ikd5yg0yjw3hkdgdql59c8k2amqin8f8"; sha256 = "0c537say0f3197zn8d83nrihabrxyn28xc6d7c9c3l0vvrv6qvfj";
}; };
buildInputs = [ ocaml findlib dune cmdliner cppo ]; buildInputs = [ cmdliner cppo ];
propagatedBuildInputs = [ yojson ]; propagatedBuildInputs = [ yojson ];
buildPhase = "dune build -p js_of_ocaml-compiler";
inherit (dune) installPhase;
meta = { meta = {
description = "Compiler from OCaml bytecode to Javascript"; description = "Compiler from OCaml bytecode to Javascript";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.vbgl ]; maintainers = [ lib.maintainers.vbgl ];
inherit (src.meta) homepage; inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
}; };
} }