Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocamlPackages.fmt: 0.8.5 → 0.8.6 #84883

Merged
merged 5 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkgs/development/ocaml-modules/cstruct/sexp.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{ lib, buildDunePackage, alcotest, cstruct, sexplib }:
{ lib, buildDunePackage, ocaml, alcotest, cstruct, sexplib }:

if !lib.versionAtLeast (cstruct.version or "1") "3"
then cstruct
else

buildDunePackage {
buildDunePackage rec {
pname = "cstruct-sexp";
inherit (cstruct) version src meta;

doCheck = true;
buildInputs = [ alcotest ];
doCheck = lib.versionAtLeast ocaml.version "4.03";
checkInputs = lib.optional doCheck alcotest;

propagatedBuildInputs = [ cstruct sexplib ];
}
Expand Down
17 changes: 11 additions & 6 deletions pkgs/development/ocaml-modules/fmt/default.nix
Original file line number Diff line number Diff line change
@@ -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 {
name = "ocaml${ocaml.version}-fmt-0.8.5";
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
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 {
url = "https://erratique.ch/software/fmt/releases/fmt-0.8.5.tbz";
sha256 = "1zj9azcxcn6skmb69ykgmi9z8c50yskwg03wqgh87lypgjdcz060";
url = "https://erratique.ch/software/fmt/releases/fmt-${version}.tbz";
sha256 = "1jlw5izgvqw1adzqi87rp0383j0vj52wmacy3rqw87vxkf7a3xin";
};

nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib topkg cmdliner ];
propagatedBuildInputs = [ result uchar ];
propagatedBuildInputs = [ seq stdlib-shims ];

inherit (topkg) buildPhase installPhase;

Expand Down
9 changes: 5 additions & 4 deletions pkgs/development/ocaml-modules/ppx_blob/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, buildDunePackage, alcotest, ocaml-migrate-parsetree }:
{ lib, fetchurl, buildDunePackage, ocaml, alcotest, ocaml-migrate-parsetree }:

buildDunePackage rec {
pname = "ppx_blob";
Expand All @@ -9,10 +9,11 @@ buildDunePackage rec {
sha256 = "1xmslk1mwdzhy1bydgsjlcb7h544c39hvxa8lywp8w72gaggjl16";
};

buildInputs = [ alcotest ocaml-migrate-parsetree ];
doCheck = true;
checkInputs = lib.optional doCheck alcotest;
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";
description = "OCaml ppx to include binary data from a file as a string";
license = licenses.unlicense;
Expand Down