ocamlPackages.containers: 1.4 → 2.6.1, and related fixes (#69132)

ocamlPackages.containers: 1.4 → 2.6.1, and related fixes
This commit is contained in:
Jörg Thalheim 2019-09-24 07:48:26 +01:00 committed by GitHub
commit 646dd55d16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 64 deletions

View File

@ -1,53 +1,26 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, cppo, gen, sequence, qtest, ounit, result { lib, fetchFromGitHub, buildDunePackage, ocaml
, qcheck }: , iter, result, uchar
, gen, mdx, ounit, qcheck, uutf
}:
let buildDunePackage rec {
version = "2.6.1";
mkpath = p: pname = "containers";
"${p}/lib/ocaml/${ocaml.version}/site-lib";
version = "1.4";
in
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-containers-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "c-cube"; owner = "c-cube";
repo = "ocaml-containers"; repo = "ocaml-containers";
rev = version; rev = version;
sha256 = "1wbarxphdrxvy7qsdp4p837h1zrv0z83pgs5lbz2h3kdnyvz2f1i"; sha256 = "02iq01pq6047hab5s8zpprwr21cygvzfcfj2lpsyj823f28crhmv";
}; };
buildInputs = [ ocaml findlib ocamlbuild cppo gen sequence qtest ounit qcheck ]; buildInputs = [ iter ];
propagatedBuildInputs = [ result ]; checkInputs = lib.optionals doCheck [ gen mdx ounit qcheck uutf ];
preConfigure = '' propagatedBuildInputs = [ result uchar ];
# The following is done so that the '#use "topfind"' directive works in the ocaml top-level
export HOME="$(mktemp -d)"
export OCAML_TOPLEVEL_PATH="${mkpath findlib}"
cat <<EOF > $HOME/.ocamlinit
let () =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found -> ()
;;
EOF
'';
configureFlags = [ doCheck = !lib.versionAtLeast ocaml.version "4.08";
"--enable-unix"
"--enable-thread"
"--enable-tests"
"--enable-docs"
"--disable-bench"
];
doCheck = true;
checkTarget = "test";
createFindlibDestdir = true;
meta = { meta = {
homepage = https://github.com/c-cube/ocaml-containers; homepage = https://github.com/c-cube/ocaml-containers;
@ -62,7 +35,6 @@ EOF
It also features optional libraries for dealing with strings, and It also features optional libraries for dealing with strings, and
helpers for unix and threads. helpers for unix and threads.
''; '';
license = stdenv.lib.licenses.bsd2; license = lib.licenses.bsd2;
platforms = ocaml.meta.platforms or [];
}; };
} }

View File

@ -1,22 +1,20 @@
{ stdenv, fetchFromGitHub, buildDunePackage, qtest, result }: { lib, fetchFromGitHub, buildDunePackage, ocaml, mdx, qtest, result }:
buildDunePackage rec { buildDunePackage rec {
pname = "sequence"; pname = "iter";
version = "1.1"; version = "1.2.1";
minimumOCamlVersion = "4.02";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "c-cube"; owner = "c-cube";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "08j37nldw47syq3yw4mzhhvya43knl0d7biddp0q9hwbaxhzgi44"; sha256 = "0j2sg50byn0ppmf6l36ksip7zx1d3gv7sc4hbbxs2rmx39jr7vxh";
}; };
buildInputs = [ qtest ]; buildInputs = lib.optionals doCheck [ mdx qtest ];
propagatedBuildInputs = [ result ]; propagatedBuildInputs = [ result ];
doCheck = true; doCheck = lib.versionAtLeast ocaml.version "4.04";
meta = { meta = {
homepage = https://github.com/c-cube/sequence; homepage = https://github.com/c-cube/sequence;
@ -27,6 +25,6 @@ buildDunePackage rec {
like `filter`, `map`, `take`, `drop` and `append` can be performed before the like `filter`, `map`, `take`, `drop` and `append` can be performed before the
sequence is iterated/folded on. sequence is iterated/folded on.
''; '';
license = stdenv.lib.licenses.bsd2; license = lib.licenses.bsd2;
}; };
} }

View File

@ -1,11 +1,9 @@
{ stdenv, fetchFromGitHub, buildDunePackage, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml_lwt, pandoc, re }: { lib, fetchFromGitHub, buildDunePackage, ocaml, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml_lwt, pandoc, re }:
buildDunePackage rec { buildDunePackage rec {
pname = "mdx"; pname = "mdx";
version = "1.4.0"; version = "1.4.0";
minimumOCamlVersion = "4.05";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "realworldocaml"; owner = "realworldocaml";
repo = pname; repo = pname;
@ -15,14 +13,16 @@ buildDunePackage rec {
nativeBuildInputs = [ cppo ]; nativeBuildInputs = [ cppo ];
buildInputs = [ astring cmdliner fmt logs ocaml-migrate-parsetree re ]; buildInputs = [ astring cmdliner fmt logs ocaml-migrate-parsetree re ];
checkInputs = [ ocaml_lwt pandoc ]; checkInputs = lib.optionals doCheck [ ocaml_lwt pandoc ];
doCheck = true; doCheck = !lib.versionAtLeast ocaml.version "4.08";
dontStrip = lib.versions.majorMinor ocaml.version == "4.04";
meta = { meta = {
homepage = https://github.com/realworldocaml/mdx; homepage = https://github.com/realworldocaml/mdx;
description = "Executable OCaml code blocks inside markdown files"; description = "Executable OCaml code blocks inside markdown files";
license = stdenv.lib.licenses.isc; license = lib.licenses.isc;
maintainers = [ stdenv.lib.maintainers.romildo ]; maintainers = [ lib.maintainers.romildo ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, buildDunePackage, mdx }: { lib, fetchFromGitHub, buildDunePackage, ocaml, mdx }:
buildDunePackage rec { buildDunePackage rec {
pname = "printbox"; pname = "printbox";
@ -13,14 +13,14 @@ buildDunePackage rec {
sha256 = "16nwwpp13hzlcm9xqfxc558afm3i5s802dkj69l9s2vp04lgms5n"; sha256 = "16nwwpp13hzlcm9xqfxc558afm3i5s802dkj69l9s2vp04lgms5n";
}; };
checkInputs = [ mdx ]; checkInputs = lib.optional doCheck mdx;
doCheck = true; doCheck = !lib.versionAtLeast ocaml.version "4.08";
meta = { meta = {
homepage = https://github.com/c-cube/printbox/; homepage = https://github.com/c-cube/printbox/;
description = "Allows to print nested boxes, lists, arrays, tables in several formats"; description = "Allows to print nested boxes, lists, arrays, tables in several formats";
license = stdenv.lib.licenses.isc; license = lib.licenses.isc;
maintainers = [ stdenv.lib.maintainers.romildo ]; maintainers = [ lib.maintainers.romildo ];
}; };
} }

View File

@ -304,6 +304,8 @@ let
iso8601 = callPackage ../development/ocaml-modules/iso8601 { }; iso8601 = callPackage ../development/ocaml-modules/iso8601 { };
iter = callPackage ../development/ocaml-modules/iter { };
javalib = callPackage ../development/ocaml-modules/javalib { javalib = callPackage ../development/ocaml-modules/javalib {
extlib = ocaml_extlib; extlib = ocaml_extlib;
}; };
@ -621,8 +623,6 @@ let
seq = callPackage ../development/ocaml-modules/seq { }; seq = callPackage ../development/ocaml-modules/seq { };
sequence = callPackage ../development/ocaml-modules/sequence { };
spacetime_lib = callPackage ../development/ocaml-modules/spacetime_lib { }; spacetime_lib = callPackage ../development/ocaml-modules/spacetime_lib { };
sqlexpr = callPackage ../development/ocaml-modules/sqlexpr { }; sqlexpr = callPackage ../development/ocaml-modules/sqlexpr { };