Merge pull request #84883 from vbgl/ocaml-fmt-0.8.6

ocamlPackages.fmt: 0.8.5 → 0.8.6
This commit is contained in:
Benjamin Hipple 2020-04-10 14:57:11 -04:00 committed by GitHub
commit dde4574cbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 14 deletions

View File

@ -1,15 +1,15 @@
{ lib, buildDunePackage, alcotest, cstruct, sexplib }: { lib, buildDunePackage, ocaml, alcotest, cstruct, sexplib }:
if !lib.versionAtLeast (cstruct.version or "1") "3" if !lib.versionAtLeast (cstruct.version or "1") "3"
then cstruct then cstruct
else else
buildDunePackage { buildDunePackage rec {
pname = "cstruct-sexp"; pname = "cstruct-sexp";
inherit (cstruct) version src meta; inherit (cstruct) version src meta;
doCheck = true; doCheck = lib.versionAtLeast ocaml.version "4.03";
buildInputs = [ alcotest ]; checkInputs = lib.optional doCheck alcotest;
propagatedBuildInputs = [ cstruct sexplib ]; propagatedBuildInputs = [ cstruct sexplib ];
} }

View File

@ -1,16 +1,21 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, result, uchar }: { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, seq, stdlib-shims }:
stdenv.mkDerivation { if !stdenv.lib.versionAtLeast ocaml.version "4.03"
name = "ocaml${ocaml.version}-fmt-0.8.5"; then throw "fmt is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
version = "0.8.6";
pname = "ocaml${ocaml.version}-fmt";
src = fetchurl { src = fetchurl {
url = "https://erratique.ch/software/fmt/releases/fmt-0.8.5.tbz"; url = "https://erratique.ch/software/fmt/releases/fmt-${version}.tbz";
sha256 = "1zj9azcxcn6skmb69ykgmi9z8c50yskwg03wqgh87lypgjdcz060"; sha256 = "1jlw5izgvqw1adzqi87rp0383j0vj52wmacy3rqw87vxkf7a3xin";
}; };
nativeBuildInputs = [ ocaml findlib ocamlbuild ]; nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib topkg cmdliner ]; buildInputs = [ findlib topkg cmdliner ];
propagatedBuildInputs = [ result uchar ]; propagatedBuildInputs = [ seq stdlib-shims ];
inherit (topkg) buildPhase installPhase; inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, buildDunePackage, alcotest, ocaml-migrate-parsetree }: { lib, fetchurl, buildDunePackage, ocaml, alcotest, ocaml-migrate-parsetree }:
buildDunePackage rec { buildDunePackage rec {
pname = "ppx_blob"; pname = "ppx_blob";
@ -9,10 +9,11 @@ buildDunePackage rec {
sha256 = "1xmslk1mwdzhy1bydgsjlcb7h544c39hvxa8lywp8w72gaggjl16"; sha256 = "1xmslk1mwdzhy1bydgsjlcb7h544c39hvxa8lywp8w72gaggjl16";
}; };
buildInputs = [ alcotest ocaml-migrate-parsetree ]; checkInputs = lib.optional doCheck alcotest;
doCheck = true; buildInputs = [ ocaml-migrate-parsetree ];
doCheck = lib.versionAtLeast ocaml.version "4.03";
meta = with stdenv.lib; { meta = with lib; {
homepage = "https://github.com/johnwhitington/ppx_blob"; homepage = "https://github.com/johnwhitington/ppx_blob";
description = "OCaml ppx to include binary data from a file as a string"; description = "OCaml ppx to include binary data from a file as a string";
license = licenses.unlicense; license = licenses.unlicense;