diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2019-12-26 14:16:15 +0100 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2019-12-26 14:17:36 +0100 |
commit | 77b6c3cd06a679140fb5a44f81f904497007f333 (patch) | |
tree | e8ed1606b326cdafba719cc2a14c527c1b601f2e /pkgs/development/ocaml-modules | |
parent | 602bccd1a8262d4e6bd787838d21fc3c2c1c50ba (diff) | |
parent | 4d2dd1554618831f0a5b159b8a4dff86612c02a9 (diff) | |
download | nixpkgs-77b6c3cd06a679140fb5a44f81f904497007f333.tar nixpkgs-77b6c3cd06a679140fb5a44f81f904497007f333.tar.gz nixpkgs-77b6c3cd06a679140fb5a44f81f904497007f333.tar.bz2 nixpkgs-77b6c3cd06a679140fb5a44f81f904497007f333.tar.lz nixpkgs-77b6c3cd06a679140fb5a44f81f904497007f333.tar.xz nixpkgs-77b6c3cd06a679140fb5a44f81f904497007f333.tar.zst nixpkgs-77b6c3cd06a679140fb5a44f81f904497007f333.zip |
Merge remote-tracking branch 'origin/master' into gcc-9
Diffstat (limited to 'pkgs/development/ocaml-modules')
111 files changed, 1146 insertions, 279 deletions
diff --git a/pkgs/development/ocaml-modules/alcotest/default.nix b/pkgs/development/ocaml-modules/alcotest/default.nix index c43ad10d7d8..8415dc751d5 100644 --- a/pkgs/development/ocaml-modules/alcotest/default.nix +++ b/pkgs/development/ocaml-modules/alcotest/default.nix @@ -6,14 +6,15 @@ let param = if stdenv.lib.versionAtLeast ocaml.version "4.02" then { version = "0.8.5"; sha256 = "1mhckvdcxkikbzgvy24kjz4265l15b86a6swz7m3ynbgvqdcfzqn"; - buildInputs = [ dune ]; + nativeBuildInputs = [ dune ]; propagatedBuildInputs = [ uuidm ]; buildPhase = "dune build -p alcotest"; inherit (dune) installPhase; } else { version = "0.7.2"; sha256 = "1qgsz2zz5ky6s5pf3j3shc4fjc36rqnjflk8x0wl1fcpvvkr52md"; - buildInputs = [ ocamlbuild topkg ]; + buildInputs = [ topkg ]; + nativeBuildInputs = [ ocamlbuild ]; inherit (topkg) buildPhase installPhase; }; in @@ -27,7 +28,8 @@ stdenv.mkDerivation rec { inherit (param) sha256; }; - buildInputs = [ ocaml findlib ] ++ param.buildInputs; + nativeBuildInputs = [ ocaml findlib ] ++ (param.nativeBuildInputs or []); + buildInputs = [ findlib ] ++ (param.buildInputs or []); propagatedBuildInputs = [ cmdliner astring fmt result ] ++ (param.propagatedBuildInputs or []); diff --git a/pkgs/development/ocaml-modules/alcotest/lwt.nix b/pkgs/development/ocaml-modules/alcotest/lwt.nix new file mode 100644 index 00000000000..f005421a6fc --- /dev/null +++ b/pkgs/development/ocaml-modules/alcotest/lwt.nix @@ -0,0 +1,16 @@ +{ lib, buildDunePackage, alcotest, logs, ocaml_lwt }: + +buildDunePackage { + pname = "alcotest-lwt"; + + inherit (alcotest) version src; + + propagatedBuildInputs = [ alcotest logs ocaml_lwt ]; + + doCheck = true; + + meta = alcotest.meta // { + description = "Lwt-based helpers for Alcotest"; + }; + +} diff --git a/pkgs/development/ocaml-modules/asn1-combinators/default.nix b/pkgs/development/ocaml-modules/asn1-combinators/default.nix index c6d99fa33e7..49fcdbd261a 100644 --- a/pkgs/development/ocaml-modules/asn1-combinators/default.nix +++ b/pkgs/development/ocaml-modules/asn1-combinators/default.nix @@ -25,7 +25,8 @@ stdenv.mkDerivation rec { inherit (param) sha256; }; - buildInputs = [ ocaml findlib ocamlbuild ounit topkg ]; + buildInputs = [ findlib ounit topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; propagatedBuildInputs = [ result cstruct zarith ] ++ param.propagatedBuildInputs; buildPhase = "${topkg.run} build --tests true"; diff --git a/pkgs/development/ocaml-modules/bap/default.nix b/pkgs/development/ocaml-modules/bap/default.nix index 0766e6e8a8c..a988582ce6c 100644 --- a/pkgs/development/ocaml-modules/bap/default.nix +++ b/pkgs/development/ocaml-modules/bap/default.nix @@ -28,8 +28,8 @@ stdenv.mkDerivation rec { createFindlibDestdir = true; setupHook = writeText "setupHook.sh" '' - export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/" - export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}-llvm-plugins/" + export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}/" + export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${name}-llvm-plugins/" ''; nativeBuildInputs = [ which makeWrapper ]; @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { installPhase = '' export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR; export PATH=$PATH:$out/bin - export CAML_LD_LIBRARY_PATH=$CAML_LD_LIBRARY_PATH:$OCAMLFIND_DESTDIR/bap-plugin-llvm/:$OCAMLFIND_DESTDIR/bap/ + export CAML_LD_LIBRARY_PATH=''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}$OCAMLFIND_DESTDIR/bap-plugin-llvm/:$OCAMLFIND_DESTDIR/bap/ mkdir -p $out/lib/bap make install rm $out/bin/baptop diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix index 3b511c7f1cc..b0ad12dad67 100644 --- a/pkgs/development/ocaml-modules/batteries/default.nix +++ b/pkgs/development/ocaml-modules/batteries/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { license = stdenv.lib.licenses.lgpl21Plus; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/biniou/default.nix b/pkgs/development/ocaml-modules/biniou/default.nix index 8f1917d6873..b97c78a399b 100644 --- a/pkgs/development/ocaml-modules/biniou/default.nix +++ b/pkgs/development/ocaml-modules/biniou/default.nix @@ -2,13 +2,13 @@ buildDunePackage rec { pname = "biniou"; - version = "1.2.0"; + version = "1.2.1"; src = fetchFromGitHub { - owner = "mjambon"; + owner = "ocaml-community"; repo = pname; - rev = "v${version}"; - sha256 = "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb"; + rev = version; + sha256 = "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790"; }; propagatedBuildInputs = [ easy-format ]; diff --git a/pkgs/development/ocaml-modules/biocaml/default.nix b/pkgs/development/ocaml-modules/biocaml/default.nix new file mode 100644 index 00000000000..4f97594fb7c --- /dev/null +++ b/pkgs/development/ocaml-modules/biocaml/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildDunePackage, fetchFromGitHub +, ounit, async, base64, camlzip, cfstream +, core, ppx_jane, ppx_sexp_conv, rresult, uri, xmlm }: + +buildDunePackage rec { + pname = "biocaml"; + version = "0.10.0"; + + owner = "biocaml"; + + minimumOCamlVersion = "4.07"; + + src = fetchFromGitHub { + inherit owner; + repo = pname; + rev = "v${version}"; + sha256 = "0dghqx6jbzihmga8jjwwavs0wqksgcns4z1nmwj0ds9ik3mcra30"; + }; + + buildInputs = [ ppx_jane ppx_sexp_conv ]; + checkInputs = [ ounit ]; + propagatedBuildInputs = [ async base64 camlzip cfstream core rresult uri xmlm ]; + + meta = with stdenv.lib; { + description = "Bioinformatics library for Ocaml"; + homepage = "http://${owner}.github.io/${pname}"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.gpl2; + }; +} diff --git a/pkgs/development/ocaml-modules/bos/default.nix b/pkgs/development/ocaml-modules/bos/default.nix index 0f168daac8c..6b37cf1aed3 100644 --- a/pkgs/development/ocaml-modules/bos/default.nix +++ b/pkgs/development/ocaml-modules/bos/default.nix @@ -10,7 +10,8 @@ stdenv.mkDerivation rec { sha256 = "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg ]; propagatedBuildInputs = [ astring fmt fpath logs rresult ]; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/camlzip/default.nix b/pkgs/development/ocaml-modules/camlzip/default.nix index c1490c3bf19..d0bc2f5a375 100644 --- a/pkgs/development/ocaml-modules/camlzip/default.nix +++ b/pkgs/development/ocaml-modules/camlzip/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation { license = "LGPL+linking exceptions"; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/camomile/0.8.2.nix b/pkgs/development/ocaml-modules/camomile/0.8.2.nix index 21897e3bf10..d206cbf9421 100644 --- a/pkgs/development/ocaml-modules/camomile/0.8.2.nix +++ b/pkgs/development/ocaml-modules/camomile/0.8.2.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { branch = "0.8.2"; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/camomile/0.8.5.nix b/pkgs/development/ocaml-modules/camomile/0.8.5.nix index eb9cdb78562..dc2049769f3 100644 --- a/pkgs/development/ocaml-modules/camomile/0.8.5.nix +++ b/pkgs/development/ocaml-modules/camomile/0.8.5.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation { license = stdenv.lib.licenses.lgpl21; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/cfstream/default.nix b/pkgs/development/ocaml-modules/cfstream/default.nix new file mode 100644 index 00000000000..db6d2b1d440 --- /dev/null +++ b/pkgs/development/ocaml-modules/cfstream/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, m4, core_kernel, ounit }: + +buildDunePackage rec { + pname = "cfstream"; + version = "1.3.0"; + + minimumOCamlVersion = "4.04.1"; + + src = fetchFromGitHub { + owner = "biocaml"; + repo = pname; + rev = version; + sha256 = "1bpzpci0cx6r3sdk183mm603wgzvvj46nlx0lpx44108anxcxbak"; + }; + + patches = [ ./git_commit.patch ]; + + buildInputs = [ m4 ]; + checkInputs = [ ounit ]; + propagatedBuildInputs = [ core_kernel ]; + + doCheck = true; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Simple Core-inspired wrapper for standard library Stream module"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl21; + }; +} diff --git a/pkgs/development/ocaml-modules/cfstream/git_commit.patch b/pkgs/development/ocaml-modules/cfstream/git_commit.patch new file mode 100644 index 00000000000..5f8d8f5ce31 --- /dev/null +++ b/pkgs/development/ocaml-modules/cfstream/git_commit.patch @@ -0,0 +1,13 @@ +diff --git a/lib/jbuild b/lib/jbuild +index fcc5a39..d72d50c 100644 +--- a/lib/jbuild ++++ b/lib/jbuild +@@ -10,7 +10,7 @@ + (rule ( + (targets (GIT_COMMIT)) + (deps (../bin/git_commit.sh)) +- (action (with-stdout-to ${@} (run ${<}))) ++ (action (with-stdout-to ${@} (run echo "None"))) + )) + + (rule ( diff --git a/pkgs/development/ocaml-modules/checkseum/default.nix b/pkgs/development/ocaml-modules/checkseum/default.nix index 18e06d260f4..731dd476c5d 100644 --- a/pkgs/development/ocaml-modules/checkseum/default.nix +++ b/pkgs/development/ocaml-modules/checkseum/default.nix @@ -1,41 +1,28 @@ -{ stdenv, fetchurl, ocaml, findlib, dune, alcotest, cmdliner, fmt, optint, rresult }: +{ lib, fetchurl, buildDunePackage +, bigarray-compat, optint +, cmdliner, fmt, rresult +, alcotest +}: -if !stdenv.lib.versionAtLeast ocaml.version "4.03" -then throw "checkseum is not available for OCaml ${ocaml.version}" -else +buildDunePackage rec { + version = "0.1.1"; + pname = "checkseum"; -# The C implementation is not portable: x86 only -let hasC = stdenv.isi686 || stdenv.isx86_64; in - -stdenv.mkDerivation rec { - version = "0.0.3"; - name = "ocaml${ocaml.version}-checkseum-${version}"; src = fetchurl { - url = "https://github.com/mirage/checkseum/releases/download/v0.0.3/checkseum-v0.0.3.tbz"; - sha256 = "12j45zsvil1ynwx1x8fbddhqacc8r1zf7f6h576y3f3yvbg7l1fm"; + url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-v${version}.tbz"; + sha256 = "0aa2r1l65a5hcgciw6n8r5ij4gpgg0cf9k24isybxiaiz63k94d3"; }; - postPatch = stdenv.lib.optionalString (!hasC) '' - rm -r bin src-c - ''; - - buildInputs = [ ocaml findlib dune alcotest cmdliner fmt rresult ]; - propagatedBuildInputs = [ optint ]; - - buildPhase = "dune build"; - - doCheck = hasC; - checkPhase = "dune runtest"; - - inherit (dune) installPhase; + buildInputs = [ cmdliner fmt rresult ]; + propagatedBuildInputs = [ bigarray-compat optint ]; + checkInputs = lib.optionals doCheck [ alcotest ]; - passthru = { inherit hasC; }; + doCheck = true; meta = { homepage = "https://github.com/mirage/checkseum"; description = "ADLER-32 and CRC32C Cyclic Redundancy Check"; - license = stdenv.lib.licenses.mit; - maintainers = [ stdenv.lib.maintainers.vbgl ]; - inherit (ocaml.meta) platforms; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; }; } diff --git a/pkgs/development/ocaml-modules/cmdliner/default.nix b/pkgs/development/ocaml-modules/cmdliner/default.nix index 271ec1f2af9..34d57b403b0 100644 --- a/pkgs/development/ocaml-modules/cmdliner/default.nix +++ b/pkgs/development/ocaml-modules/cmdliner/default.nix @@ -25,8 +25,8 @@ stdenv.mkDerivation rec { inherit (param) sha256; }; - nativeBuildInputs = [ ocamlbuild topkg ]; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml ocamlbuild findlib ]; + buildInputs = [ topkg ]; propagatedBuildInputs = [ result ]; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/containers/default.nix b/pkgs/development/ocaml-modules/containers/default.nix index 1b465c2984e..b12b6e8c265 100644 --- a/pkgs/development/ocaml-modules/containers/default.nix +++ b/pkgs/development/ocaml-modules/containers/default.nix @@ -4,23 +4,23 @@ }: buildDunePackage rec { - version = "2.6.1"; + version = "2.7"; pname = "containers"; src = fetchFromGitHub { owner = "c-cube"; repo = "ocaml-containers"; - rev = version; - sha256 = "02iq01pq6047hab5s8zpprwr21cygvzfcfj2lpsyj823f28crhmv"; + rev = "v${version}"; + sha256 = "1nsxfgn1g1vpqihb9gd6gsab0bcm70nf9z84cp441c8wsc57hi6a"; }; buildInputs = [ iter ]; - checkInputs = lib.optionals doCheck [ gen mdx ounit qcheck uutf ]; + checkInputs = lib.optionals doCheck [ gen mdx.bin ounit qcheck uutf ]; propagatedBuildInputs = [ result uchar ]; - doCheck = !lib.versionAtLeast ocaml.version "4.08"; + doCheck = true; meta = { homepage = https://github.com/c-cube/ocaml-containers; diff --git a/pkgs/development/ocaml-modules/cpuid/default.nix b/pkgs/development/ocaml-modules/cpuid/default.nix index 10938cf81c2..6c7ecaa4b7a 100644 --- a/pkgs/development/ocaml-modules/cpuid/default.nix +++ b/pkgs/development/ocaml-modules/cpuid/default.nix @@ -1,22 +1,20 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ocb-stubblr }: +{ lib, fetchurl, buildDunePackage }: -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-cpuid-0.1.0"; +buildDunePackage rec { + pname = "cpuid"; + version = "0.1.2"; + + minimumOCamlVersion = "4.03"; src = fetchurl { - url = https://github.com/pqwy/cpuid/releases/download/v0.1.0/cpuid-0.1.0.tbz; - sha256 = "08k2558a3dnxn8msgpz8c93sfn0y027ganfdi2yvql0fp1ixv97p"; + url = "https://github.com/pqwy/cpuid/releases/download/v${version}/cpuid-v${version}.tbz"; + sha256 = "08ng4mva6qblb5ipkrxbr0my7ndkc4qwcbswkqgbgir864s74m93"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ocb-stubblr ]; - - inherit (topkg) buildPhase installPhase; - meta = { homepage = https://github.com/pqwy/cpuid; description = "Detect CPU features from OCaml"; - license = stdenv.lib.licenses.isc; - maintainers = [ stdenv.lib.maintainers.vbgl ]; - inherit (ocaml.meta) platforms; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; }; } diff --git a/pkgs/development/ocaml-modules/cryptgps/default.nix b/pkgs/development/ocaml-modules/cryptgps/default.nix index 8d395798979..f6d22100873 100644 --- a/pkgs/development/ocaml-modules/cryptgps/default.nix +++ b/pkgs/development/ocaml-modules/cryptgps/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { license = stdenv.lib.licenses.mit; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/cryptokit/default.nix b/pkgs/development/ocaml-modules/cryptokit/default.nix index 8181433e1ee..50857e159dd 100644 --- a/pkgs/development/ocaml-modules/cryptokit/default.nix +++ b/pkgs/development/ocaml-modules/cryptokit/default.nix @@ -5,9 +5,9 @@ assert stdenv.lib.versionAtLeast ocaml.version "3.12"; let param = if stdenv.lib.versionAtLeast ocaml.version "4.02" then { - version = "1.13"; - url = https://github.com/xavierleroy/cryptokit/archive/release113.tar.gz; - sha256 = "1f4jjnp2a911nqw0hbijyv9vygkk6kw5zx75qs49hfm3by6ij8rq"; + version = "1.14"; + url = https://github.com/xavierleroy/cryptokit/archive/release114.tar.gz; + sha256 = "0wkh72idkb7dahiwyl94hhbq27cc7x9fnmxkpnbqli6wi8wd7d05"; inherit zarith; } else { version = "1.10"; @@ -25,8 +25,8 @@ stdenv.mkDerivation { inherit (param) url sha256; }; - buildInputs = [ zlib ocaml findlib ocamlbuild ncurses ]; - propagatedBuildInputs = [ param.zarith ]; + buildInputs = [ ocaml findlib ocamlbuild ncurses ]; + propagatedBuildInputs = [ param.zarith zlib ]; buildFlags = "setup.data build"; @@ -37,7 +37,7 @@ stdenv.mkDerivation { description = "A library of cryptographic primitives for OCaml"; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/decompress/default.nix b/pkgs/development/ocaml-modules/decompress/default.nix index 828d3a98f9d..753f894e085 100644 --- a/pkgs/development/ocaml-modules/decompress/default.nix +++ b/pkgs/development/ocaml-modules/decompress/default.nix @@ -22,6 +22,5 @@ buildDunePackage rec { license = lib.licenses.mit; maintainers = [ lib.maintainers.vbgl ]; homepage = "https://github.com/mirage/decompress"; - broken = !checkseum.hasC; }; } diff --git a/pkgs/development/ocaml-modules/dispatch/default.nix b/pkgs/development/ocaml-modules/dispatch/default.nix new file mode 100644 index 00000000000..5de61169c36 --- /dev/null +++ b/pkgs/development/ocaml-modules/dispatch/default.nix @@ -0,0 +1,27 @@ +{ lib, buildDunePackage, fetchFromGitHub, alcotest, result }: + +buildDunePackage rec { + pname = "dispatch"; + version = "0.4.1"; + + src = fetchFromGitHub { + owner = "inhabitedtype"; + repo = "ocaml-dispatch"; + rev = "${version}"; + sha256 = "05kb9zcihk50r2haqz8vrlr7kmaka6vrs4j1z500lmnl877as6qr"; + }; + + propagatedBuildInputs = [ result ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = { + inherit (src.meta) homepage; + license = lib.licenses.bsd3; + description = "Path-based dispatching for client- and server-side applications"; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/dtoa/default.nix b/pkgs/development/ocaml-modules/dtoa/default.nix index 87d9ac7a324..16a9f96798c 100644 --- a/pkgs/development/ocaml-modules/dtoa/default.nix +++ b/pkgs/development/ocaml-modules/dtoa/default.nix @@ -2,13 +2,13 @@ buildDunePackage rec { pname = "dtoa"; - version = "0.3.1"; + version = "0.3.2"; minimumOCamlVersion = "4.02"; src = fetchurl { - url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; - sha256 = "0rzysj07z2q6gk0yhjxnjnba01vmdb9x32wwna10qk3rrb8r2pnn"; + url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0zkhn0rdq82g6gamsv6nkx6i44s8104nh6jg5xydazl9jl1704xn"; }; hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow"; diff --git a/pkgs/development/ocaml-modules/dune-configurator/default.nix b/pkgs/development/ocaml-modules/dune-configurator/default.nix new file mode 100644 index 00000000000..d84c21565db --- /dev/null +++ b/pkgs/development/ocaml-modules/dune-configurator/default.nix @@ -0,0 +1,17 @@ +{ lib, buildDunePackage, dune_2, dune-private-libs }: + +buildDunePackage rec { + pname = "dune-configurator"; + + inherit (dune_2) src version; + + dontAddPrefix = true; + + propagatedBuildInputs = [ dune-private-libs ]; + + meta = with lib; { + description = "Helper library for gathering system configuration"; + maintainers = [ maintainers.marsam ]; + license = licenses.mit; + }; +} diff --git a/pkgs/development/ocaml-modules/dune-private-libs/default.nix b/pkgs/development/ocaml-modules/dune-private-libs/default.nix new file mode 100644 index 00000000000..1c3503f11a1 --- /dev/null +++ b/pkgs/development/ocaml-modules/dune-private-libs/default.nix @@ -0,0 +1,15 @@ +{ lib, buildDunePackage, dune_2 }: + +buildDunePackage rec { + pname = "dune-private-libs"; + + inherit (dune_2) src version; + + dontAddPrefix = true; + + meta = with lib; { + description = "Private libraries of Dune"; + maintainers = [ maintainers.marsam ]; + license = licenses.mit; + }; +} diff --git a/pkgs/development/ocaml-modules/easy-format/default.nix b/pkgs/development/ocaml-modules/easy-format/default.nix index bbf4d82b519..5c1155a723b 100644 --- a/pkgs/development/ocaml-modules/easy-format/default.nix +++ b/pkgs/development/ocaml-modules/easy-format/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation { meta = with stdenv.lib; { description = "A high-level and functional interface to the Format module of the OCaml standard library"; - homepage = "http://mjambon.com/${pname}.html"; + homepage = "https://github.com/ocaml-community/${pname}"; license = licenses.bsd3; maintainers = [ maintainers.vbgl ]; }; diff --git a/pkgs/development/ocaml-modules/eigen/default.nix b/pkgs/development/ocaml-modules/eigen/default.nix new file mode 100644 index 00000000000..7c1ec79f7da --- /dev/null +++ b/pkgs/development/ocaml-modules/eigen/default.nix @@ -0,0 +1,25 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, ctypes }: + +buildDunePackage rec { + pname = "eigen"; + version = "0.1.5"; + + src = fetchFromGitHub { + owner = "owlbarn"; + repo = pname; + rev = version; + sha256 = "0pbqd87i9h7qpx84hr8k4iw0rhmjgma4s3wihxh992jjvsrgdyfi"; + }; + + minimumOCamlVersion = "4.04"; + + propagatedBuildInputs = [ ctypes ]; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Minimal/incomplete Ocaml interface to Eigen3, mostly for Owl"; + platforms = platforms.x86_64; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.mit; + }; +} diff --git a/pkgs/development/ocaml-modules/facile/default.nix b/pkgs/development/ocaml-modules/facile/default.nix index e8553ebf812..8834de53a8f 100644 --- a/pkgs/development/ocaml-modules/facile/default.nix +++ b/pkgs/development/ocaml-modules/facile/default.nix @@ -1,38 +1,19 @@ -{ stdenv, fetchurl, ocaml, findlib }: +{ lib, fetchurl, buildDunePackage }: -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-facile-${version}"; - - version = "1.1.3"; +buildDunePackage rec { + pname = "facile"; + version = "1.1.4"; src = fetchurl { - url = "http://opti.recherche.enac.fr/facile/distrib/facile-${version}.tar.gz"; - sha256 = "1v4apqcw4gm36ph5xwf1wxaaza0ggvihvgsdslnf33fa1pdkvdjw"; + url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz"; + sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp"; }; - dontAddPrefix = 1; - - buildInputs = [ ocaml findlib ]; - - createFindlibDestdir = true; - - installFlags = [ "FACILEDIR=$(OCAMLFIND_DESTDIR)/facile" ]; - - postInstall = '' - cat > $OCAMLFIND_DESTDIR/facile/META <<EOF - version = "${version}" - name = "facile" - description = "A Functional Constraint Library" - requires = "" - archive(byte) = "facile.cma" - archive(native) = "facile.cmxa" - EOF - ''; + doCheck = true; meta = { homepage = "http://opti.recherche.enac.fr/facile/"; - license = stdenv.lib.licenses.lgpl21Plus; + license = lib.licenses.lgpl21Plus; description = "A Functional Constraint Library"; - platforms = stdenv.lib.platforms.unix; }; } diff --git a/pkgs/development/ocaml-modules/fmt/default.nix b/pkgs/development/ocaml-modules/fmt/default.nix index c7fff722399..d136ec092c2 100644 --- a/pkgs/development/ocaml-modules/fmt/default.nix +++ b/pkgs/development/ocaml-modules/fmt/default.nix @@ -8,7 +8,8 @@ stdenv.mkDerivation { sha256 = "1zj9azcxcn6skmb69ykgmi9z8c50yskwg03wqgh87lypgjdcz060"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg cmdliner ]; propagatedBuildInputs = [ result uchar ]; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/functoria/default.nix b/pkgs/development/ocaml-modules/functoria/default.nix index a174bd6a8b1..cc99b726e6e 100644 --- a/pkgs/development/ocaml-modules/functoria/default.nix +++ b/pkgs/development/ocaml-modules/functoria/default.nix @@ -1,28 +1,27 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg -, bos, cmdliner, ocamlgraph +{ stdenv, fetchurl, buildDunePackage, alcotest, cmdliner +, rresult, astring, fmt, ocamlgraph, logs, bos, fpath, ptime }: -if !stdenv.lib.versionAtLeast ocaml.version "4.03" -then throw "functoria is not available for OCaml ${ocaml.version}" else +buildDunePackage rec { + pname = "functoria"; + version = "3.0.3"; -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-functoria-${version}"; - version = "2.0.2"; - src = fetchurl { - url = "https://github.com/mirage/functoria/releases/download/${version}/functoria-${version}.tbz"; - sha256 = "019rl4rir4lwgjyqj2wq3ylw4daih1kxxgbc6ld6kzcq66mwr747"; - }; + minimumOCamlVersion = "4.04"; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; - propagatedBuildInputs = [ bos cmdliner ocamlgraph ]; + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "08wv2890gz7ci1fa2b3z4cvqf98nqb09f89y08kcmnsirlbbzlfh"; + }; - inherit (topkg) buildPhase installPhase; + propagatedBuildInputs = [ cmdliner rresult astring fmt ocamlgraph logs bos fpath ptime ]; + checkInputs = [ alcotest ]; - meta = { - description = "A DSL to organize functor applications"; - homepage = https://github.com/mirage/functoria; - license = stdenv.lib.licenses.isc; - maintainers = [ stdenv.lib.maintainers.vbgl ]; - inherit (ocaml.meta) platforms; - }; + doCheck = true; + + meta = with stdenv.lib; { + description = "A DSL to organize functor applications"; + homepage = https://github.com/mirage/functoria; + license = licenses.isc; + maintainers = [ maintainers.vbgl ]; + }; } diff --git a/pkgs/development/ocaml-modules/git/default.nix b/pkgs/development/ocaml-modules/git/default.nix index 929382abe76..741e004979c 100644 --- a/pkgs/development/ocaml-modules/git/default.nix +++ b/pkgs/development/ocaml-modules/git/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildDunePackage +{ lib, fetchurl, buildDunePackage , alcotest, git, mtime, nocrypto , angstrom, astring, cstruct, decompress, digestif, encore, duff, fmt , fpath, hex, ke, logs, lru, ocaml_lwt, ocamlgraph, ocplib-endian, uri, rresult @@ -6,13 +6,11 @@ buildDunePackage rec { pname = "git"; - version = "2.1.0"; + version = "2.1.2"; - src = fetchFromGitHub { - owner = "mirage"; - repo = "ocaml-git"; - rev = version; - sha256 = "0v55zkwgml6i5hp0kzynbi58z6j15k3qgzg06b3h8pdbv5fwd1jp"; + src = fetchurl { + url = "https://github.com/mirage/ocaml-git/releases/download/${version}/git-${version}.tbz"; + sha256 = "0yyclsh255k7pvc2fcsdi8k2fcrr0by2nz6g3sqnwlimjyp7mz5j"; }; propagatedBuildInputs = [ angstrom astring cstruct decompress digestif encore duff fmt fpath hex ke logs lru ocaml_lwt ocamlgraph ocplib-endian uri rresult ]; @@ -23,6 +21,6 @@ buildDunePackage rec { description = "Git format and protocol in pure OCaml"; license = lib.licenses.isc; maintainers = [ lib.maintainers.vbgl ]; - inherit (src.meta) homepage; + homepage = "https://github.com/mirage/ocaml-git"; }; } diff --git a/pkgs/development/ocaml-modules/gnuplot/default.nix b/pkgs/development/ocaml-modules/gnuplot/default.nix new file mode 100644 index 00000000000..e473273b8da --- /dev/null +++ b/pkgs/development/ocaml-modules/gnuplot/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildDunePackage, fetchFromBitbucket, gnuplot, core }: + +buildDunePackage rec { + pname = "gnuplot"; + version = "0.5.3"; + + src = fetchFromBitbucket { + owner = "ogu"; + repo = "${pname}-ocaml"; + rev = "release-${version}"; + sha256 = "00sn9g46pj8pfh7faiyxg3pfhq7w9knafyabjr464bh6qz5kiin3"; + }; + + propagatedBuildInputs = [ core gnuplot ]; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Ocaml bindings to Gnuplot"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl21; + }; +} diff --git a/pkgs/development/ocaml-modules/graphql/cohttp.nix b/pkgs/development/ocaml-modules/graphql/cohttp.nix new file mode 100644 index 00000000000..c6e85da77f3 --- /dev/null +++ b/pkgs/development/ocaml-modules/graphql/cohttp.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, ocaml-crunch +, astring, cohttp, digestif, graphql, ocplib-endian +, alcotest, cohttp-lwt-unix, graphql-lwt +}: + +buildDunePackage rec { + pname = "graphql-cohttp"; + + inherit (graphql) version src; + + nativeBuildInputs = [ ocaml-crunch ]; + propagatedBuildInputs = [ astring cohttp digestif graphql ocplib-endian ]; + + checkInputs = lib.optionals doCheck [ alcotest cohttp-lwt-unix graphql-lwt ]; + + doCheck = true; + + meta = graphql.meta // { + description = "Run GraphQL servers with “cohttp”"; + }; + +} + + diff --git a/pkgs/development/ocaml-modules/graphql/default.nix b/pkgs/development/ocaml-modules/graphql/default.nix new file mode 100644 index 00000000000..22b7bf35f8e --- /dev/null +++ b/pkgs/development/ocaml-modules/graphql/default.nix @@ -0,0 +1,18 @@ +{ lib, buildDunePackage, alcotest, graphql_parser, rresult, yojson }: + +buildDunePackage rec { + pname = "graphql"; + + inherit (graphql_parser) version src; + + propagatedBuildInputs = [ graphql_parser rresult yojson ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = graphql_parser.meta // { + description = "Build GraphQL schemas and execute queries against them"; + }; + +} diff --git a/pkgs/development/ocaml-modules/graphql/lwt.nix b/pkgs/development/ocaml-modules/graphql/lwt.nix new file mode 100644 index 00000000000..37d75f9e22e --- /dev/null +++ b/pkgs/development/ocaml-modules/graphql/lwt.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, alcotest, graphql, ocaml_lwt }: + +buildDunePackage rec { + pname = "graphql-lwt"; + + inherit (graphql) version src; + + propagatedBuildInputs = [ graphql ocaml_lwt ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = graphql.meta // { + description = "Build GraphQL schemas with Lwt support"; + }; + +} + diff --git a/pkgs/development/ocaml-modules/graphql/parser.nix b/pkgs/development/ocaml-modules/graphql/parser.nix new file mode 100644 index 00000000000..4172ccd8d04 --- /dev/null +++ b/pkgs/development/ocaml-modules/graphql/parser.nix @@ -0,0 +1,28 @@ +{ lib, buildDunePackage, fetchurl, alcotest, fmt, menhir, re }: + +buildDunePackage rec { + pname = "graphql_parser"; + version = "0.13.0"; + + minimumOCamlVersion = "4.03"; + + src = fetchurl { + url = "https://github.com/andreas/ocaml-graphql-server/releases/download/${version}/graphql-${version}.tbz"; + sha256 = "0gb5y99ph0nz5y3pc1gxq1py4wji2hyf2ydbp0hv23v00n50hpsm"; + }; + + nativeBuildInputs = [ menhir ]; + propagatedBuildInputs = [ fmt re ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = { + homepage = "https://github.com/andreas/ocaml-graphql-server"; + description = "Library for parsing GraphQL queries"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/index/default.nix b/pkgs/development/ocaml-modules/index/default.nix new file mode 100644 index 00000000000..b1141f814a8 --- /dev/null +++ b/pkgs/development/ocaml-modules/index/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchurl, buildDunePackage, fmt, logs }: + +buildDunePackage rec { + pname = "index"; + version = "1.0.1"; + + minimumOCamlVersion = "4.07"; + + src = fetchurl { + url = "https://github.com/mirage/index/releases/download/${version}/index-${version}.tbz"; + sha256 = "1006wr3g21s4j2vsd73gphhkrh1fy4swh6gqvlsa9c6q7vz9wbvz"; + }; + + propagatedBuildInputs = [ fmt logs ]; + + meta = { + homepage = "https://github.com/mirage/index"; + description = "A platform-agnostic multi-level index"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/irmin-watcher/default.nix b/pkgs/development/ocaml-modules/irmin-watcher/default.nix new file mode 100644 index 00000000000..55dc9ca866b --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin-watcher/default.nix @@ -0,0 +1,23 @@ +{ lib, fetchurl, buildDunePackage +, astring, fmt, logs, ocaml_lwt +}: + +buildDunePackage rec { + pname = "irmin-watcher"; + version = "0.4.1"; + + src = fetchurl { + url = "https://github.com/mirage/irmin-watcher/releases/download/${version}/irmin-watcher-${version}.tbz"; + sha256 = "00d4ph4jbsw6adp3zqdrwi099hfcf7p1xzi0685qr7bgcmandjfv"; + }; + + propagatedBuildInputs = [ astring fmt logs ocaml_lwt ]; + + meta = { + homepage = "https://github.com/mirage/irmin-watcher"; + description = "Portable Irmin watch backends using FSevents or Inotify"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/irmin/1.4.nix b/pkgs/development/ocaml-modules/irmin/1.4.nix new file mode 100644 index 00000000000..878160f4b0a --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/1.4.nix @@ -0,0 +1,26 @@ +{ lib, fetchurl, buildDunePackage, ocaml +, astring, cstruct, fmt, hex, jsonm, logs, ocaml_lwt, ocamlgraph, uri +}: + +buildDunePackage rec { + pname = "irmin"; + version = "1.4.0"; + + minimumOCamlVersion = "4.03"; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/${version}/${pname}-${version}.tbz"; + sha256 = "019di4cz0z65knl232rnwj26npnc1mqh8j71xbf0mav6x350g1w5"; + }; + + propagatedBuildInputs = [ astring cstruct fmt hex jsonm logs ocaml_lwt ocamlgraph uri ]; + + doCheck = true; + + meta = with lib; { + homepage = https://github.com/mirage/irmin; + description = "Irmin, a distributed database that follows the same design principles as Git"; + license = licenses.isc; + maintainers = [ maintainers.alexfmpe ]; + }; +} diff --git a/pkgs/development/ocaml-modules/irmin/default.nix b/pkgs/development/ocaml-modules/irmin/default.nix new file mode 100644 index 00000000000..2db57671177 --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/default.nix @@ -0,0 +1,31 @@ +{ lib, fetchurl, buildDunePackage +, astring, base64, digestif, fmt, jsonm, logs, ocaml_lwt, ocamlgraph, uri +, alcotest, hex +}: + +buildDunePackage rec { + + pname = "irmin"; + version = "2.0.0"; + + minimumOCamlVersion = "4.06"; + + src = fetchurl { + url = "https://github.com/mirage/irmin/releases/download/${version}/irmin-${version}.tbz"; + sha256 = "09qffvgi5yrm3ghiywlbdhjly8xb5x5njnan213q8j033fzmf2dr"; + }; + + propagatedBuildInputs = [ astring base64 digestif fmt jsonm logs ocaml_lwt ocamlgraph uri ]; + + checkInputs = lib.optionals doCheck [ alcotest hex ]; + + doCheck = true; + + meta = { + homepage = "https://irmin.org/"; + description = "A distributed database built on the same principles as Git"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/irmin/fs.nix b/pkgs/development/ocaml-modules/irmin/fs.nix new file mode 100644 index 00000000000..b1987aa7cbc --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/fs.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, irmin, irmin-test }: + +buildDunePackage rec { + + pname = "irmin-fs"; + + inherit (irmin) version src; + + propagatedBuildInputs = [ irmin ]; + + checkInputs = lib.optional doCheck irmin-test; + + doCheck = true; + + meta = irmin.meta // { + description = "Generic file-system backend for Irmin"; + }; + +} + + diff --git a/pkgs/development/ocaml-modules/irmin/git.nix b/pkgs/development/ocaml-modules/irmin/git.nix new file mode 100644 index 00000000000..bb28042a1f6 --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/git.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, git, irmin, irmin-mem, irmin-test, git-unix }: + +buildDunePackage rec { + + pname = "irmin-git"; + + inherit (irmin) version src; + + propagatedBuildInputs = [ git irmin ]; + + checkInputs = lib.optionals doCheck [ git-unix irmin-mem irmin-test ]; + + doCheck = true; + + meta = irmin.meta // { + description = "Git backend for Irmin"; + }; + +} + diff --git a/pkgs/development/ocaml-modules/irmin/graphql.nix b/pkgs/development/ocaml-modules/irmin/graphql.nix new file mode 100644 index 00000000000..abcdc3d58dd --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/graphql.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, cohttp-lwt, graphql-cohttp, graphql-lwt, irmin }: + +buildDunePackage rec { + + pname = "irmin-graphql"; + + inherit (irmin) version src; + + propagatedBuildInputs = [ cohttp-lwt graphql-cohttp graphql-lwt irmin ]; + + doCheck = true; + + meta = irmin.meta // { + description = "GraphQL server for Irmin"; + }; + +} + + + diff --git a/pkgs/development/ocaml-modules/irmin/http.nix b/pkgs/development/ocaml-modules/irmin/http.nix new file mode 100644 index 00000000000..c8db6d563c9 --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/http.nix @@ -0,0 +1,23 @@ +{ lib, buildDunePackage, cohttp-lwt, irmin, webmachine +, checkseum, git-unix, irmin-git, irmin-mem, irmin-test +}: + +buildDunePackage rec { + + pname = "irmin-http"; + + inherit (irmin) version src; + + propagatedBuildInputs = [ cohttp-lwt irmin webmachine ]; + + checkInputs = lib.optionals doCheck [ checkseum git-unix irmin-git irmin-mem irmin-test ]; + + doCheck = true; + + meta = irmin.meta // { + description = "HTTP client and server for Irmin"; + }; + +} + + diff --git a/pkgs/development/ocaml-modules/irmin/mem.nix b/pkgs/development/ocaml-modules/irmin/mem.nix new file mode 100644 index 00000000000..b7040b9db0d --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/mem.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, irmin, irmin-test }: + +buildDunePackage rec { + + pname = "irmin-mem"; + + inherit (irmin) version src; + + propagatedBuildInputs = [ irmin ]; + + checkInputs = lib.optional doCheck irmin-test; + + doCheck = true; + + meta = irmin.meta // { + description = "Generic in-memory Irmin stores"; + }; + +} diff --git a/pkgs/development/ocaml-modules/irmin/pack.nix b/pkgs/development/ocaml-modules/irmin/pack.nix new file mode 100644 index 00000000000..4eacc719cec --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/pack.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, alcotest-lwt, index, irmin, irmin-test }: + +buildDunePackage rec { + + pname = "irmin-pack"; + + inherit (irmin) version src; + + propagatedBuildInputs = [ index irmin ]; + + checkInputs = lib.optionals doCheck [ alcotest-lwt irmin-test ]; + + doCheck = true; + + meta = irmin.meta // { + description = "Irmin backend which stores values in a pack file"; + }; + +} diff --git a/pkgs/development/ocaml-modules/irmin/test.nix b/pkgs/development/ocaml-modules/irmin/test.nix new file mode 100644 index 00000000000..57e33e2db8a --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/test.nix @@ -0,0 +1,15 @@ +{ buildDunePackage, alcotest, cmdliner, irmin, metrics-unix, mtime }: + +buildDunePackage { + + pname = "irmin-test"; + + inherit (irmin) version src; + + propagatedBuildInputs = [ alcotest cmdliner irmin metrics-unix mtime ]; + + meta = irmin.meta // { + description = "Irmin test suite"; + }; + +} diff --git a/pkgs/development/ocaml-modules/irmin/unix.nix b/pkgs/development/ocaml-modules/irmin/unix.nix new file mode 100644 index 00000000000..5793678bfcf --- /dev/null +++ b/pkgs/development/ocaml-modules/irmin/unix.nix @@ -0,0 +1,26 @@ +{ lib, buildDunePackage +, checkseum, cmdliner, git-unix, yaml +, irmin, irmin-fs, irmin-git, irmin-graphql, irmin-http, irmin-mem, irmin-pack, irmin-watcher +, irmin-test +}: + +buildDunePackage rec { + + pname = "irmin-unix"; + + inherit (irmin) version src; + + propagatedBuildInputs = [ checkseum cmdliner git-unix yaml + irmin irmin-fs irmin-git irmin-graphql irmin-http irmin-mem irmin-pack irmin-watcher + ]; + + checkInputs = lib.optional doCheck irmin-test; + + doCheck = true; + + meta = irmin.meta // { + description = "Unix backends for Irmin"; + }; + +} + diff --git a/pkgs/development/ocaml-modules/iso8601/default.nix b/pkgs/development/ocaml-modules/iso8601/default.nix index 40db8246f4a..96f0205aa79 100644 --- a/pkgs/development/ocaml-modules/iso8601/default.nix +++ b/pkgs/development/ocaml-modules/iso8601/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { createFindlibDestdir = true; meta = { - homepage = http://sagotch.github.io/ISO8601.ml/; + homepage = https://ocaml-community.github.io/ISO8601.ml/; description = "ISO 8601 and RFC 3999 date parsing for OCaml"; license = stdenv.lib.licenses.mit; platforms = ocaml.meta.platforms or []; diff --git a/pkgs/development/ocaml-modules/iter/default.nix b/pkgs/development/ocaml-modules/iter/default.nix index eb2ca1409ab..964a7c6f5a3 100644 --- a/pkgs/development/ocaml-modules/iter/default.nix +++ b/pkgs/development/ocaml-modules/iter/default.nix @@ -11,7 +11,7 @@ buildDunePackage rec { sha256 = "0j2sg50byn0ppmf6l36ksip7zx1d3gv7sc4hbbxs2rmx39jr7vxh"; }; - buildInputs = lib.optionals doCheck [ mdx qtest ]; + buildInputs = lib.optionals doCheck [ mdx.bin qtest ]; propagatedBuildInputs = [ result ]; doCheck = lib.versionAtLeast ocaml.version "4.04"; diff --git a/pkgs/development/ocaml-modules/jsonm/default.nix b/pkgs/development/ocaml-modules/jsonm/default.nix index c4a7fa0f7a7..d1f5cabb32d 100644 --- a/pkgs/development/ocaml-modules/jsonm/default.nix +++ b/pkgs/development/ocaml-modules/jsonm/default.nix @@ -10,7 +10,8 @@ stdenv.mkDerivation { sha256 = "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ findlib topkg ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; propagatedBuildInputs = [ uutf ]; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/kafka/default.nix b/pkgs/development/ocaml-modules/kafka/default.nix new file mode 100644 index 00000000000..4eeb8d975fd --- /dev/null +++ b/pkgs/development/ocaml-modules/kafka/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, buildDunePackage, base, cmdliner, ocaml_lwt, + rdkafka, zlib }: + +buildDunePackage rec { + pname = "kafka"; + version = "0.4"; + + src = fetchFromGitHub { + owner = "didier-wenzek"; + repo = "ocaml-kafka"; + rev = version; + sha256 = "0lb8x0wh7sf8v9mjwhq32azjz54kw49fsjfb7m76z4nhxfkjw5hy"; + }; + + buildInputs = [ base cmdliner ocaml_lwt zlib ]; + + propagatedBuildInputs = [ rdkafka zlib ]; + + meta = with stdenv.lib; { + homepage = https://github.com/didier-wenzek/ocaml-kafka; + description = "OCaml bindings for Kafka"; + license = licenses.mit; + maintainers = [ maintainers.rixed ]; + }; +} + diff --git a/pkgs/development/ocaml-modules/lablgl/default.nix b/pkgs/development/ocaml-modules/lablgl/default.nix index 427d0d5a0e1..ae85847b58b 100644 --- a/pkgs/development/ocaml-modules/lablgl/default.nix +++ b/pkgs/development/ocaml-modules/lablgl/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ocaml, lablgtk, findlib, libGLU_combined, freeglut, camlp4 } : +{stdenv, fetchurl, ocaml, lablgtk, findlib, libGLU, libGL, freeglut, camlp4 } : let pname = "lablgl"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ocaml findlib lablgtk freeglut camlp4]; - propagatedBuildInputs = [ libGLU_combined ]; + propagatedBuildInputs = [ libGLU libGL ]; patches = [ ./Makefile.config.patch ./META.patch ]; diff --git a/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix index 581319a0edf..d0349de4db3 100644 --- a/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix +++ b/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation (rec { branch = "2.14"; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi stdenv.lib.maintainers.roconnor ]; homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk.html; diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix index 1b1869f991e..217af54040f 100644 --- a/pkgs/development/ocaml-modules/lablgtk/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation { meta = with stdenv.lib; { platforms = ocaml.meta.platforms or []; maintainers = with maintainers; [ - z77z roconnor vbgl + maggesi roconnor vbgl ]; homepage = http://lablgtk.forge.ocamlcore.org/; description = "An OCaml interface to GTK"; diff --git a/pkgs/development/ocaml-modules/logs/default.nix b/pkgs/development/ocaml-modules/logs/default.nix index 15d2bde0ec6..50d68520fab 100644 --- a/pkgs/development/ocaml-modules/logs/default.nix +++ b/pkgs/development/ocaml-modules/logs/default.nix @@ -10,15 +10,16 @@ then throw "logs is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - name = "ocaml-${pname}-${version}"; - version = "0.6.3"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + version = "0.7.0"; src = fetchurl { url = "${webpage}/releases/${pname}-${version}.tbz"; - sha256 = "1lkhr7i44xw4kpfbhgj3rbqy3dv5bfm4kyrbl8a9rfafddcxlwss"; + sha256 = "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg fmt cmdliner lwt ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg fmt cmdliner lwt ]; propagatedBuildInputs = [ result ]; buildPhase = "${topkg.run} build --with-js_of_ocaml false"; diff --git a/pkgs/development/ocaml-modules/lua-ml/default.nix b/pkgs/development/ocaml-modules/lua-ml/default.nix new file mode 100644 index 00000000000..a0db995827a --- /dev/null +++ b/pkgs/development/ocaml-modules/lua-ml/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, dune }: + +if !stdenv.lib.versionAtLeast ocaml.version "4.07" +then throw "lua-ml is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + pname = "lua-ml"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + version = "0.9"; + + src = fetchFromGitHub { + owner = "lindig"; + repo = pname; + rev = "${version}"; + sha256 = "09lj6qykg15fdf65in7xdry0jcifcr8vqbvz85v12gwfckmmxjir"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + + buildFlags = [ "lib" ]; + + inherit (dune) installPhase; + + meta = { + description = "An embeddable Lua 2.5 interpreter implemented in OCaml"; + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + license = stdenv.lib.licenses.bsd2; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/development/ocaml-modules/lwt/3.x.nix b/pkgs/development/ocaml-modules/lwt/3.x.nix deleted file mode 100644 index c8371feb905..00000000000 --- a/pkgs/development/ocaml-modules/lwt/3.x.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv, fetchzip, pkgconfig, ncurses, libev, dune -, ocaml, findlib, cppo -, ocaml-migrate-parsetree, ppx_tools_versioned, result -, withP4 ? true -, camlp4 ? null -}: - -stdenv.mkDerivation rec { - version = "3.3.0"; - name = "ocaml${ocaml.version}-lwt-${version}"; - - src = fetchzip { - url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz"; - sha256 = "0n87hcyl4svy0risj439wyfq6bl77qxq3nraqgdr1qbz5lskbq2j"; - }; - - preConfigure = '' - ocaml src/util/configure.ml -use-libev true -use-camlp4 ${if withP4 then "true" else "false"} - ''; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ ncurses ocaml findlib dune cppo - ocaml-migrate-parsetree ppx_tools_versioned ] - ++ stdenv.lib.optional withP4 camlp4; - propagatedBuildInputs = [ libev result ]; - - installPhase = '' - ocaml src/util/install_filter.ml - ${dune.installPhase} - ''; - - meta = { - homepage = "https://ocsigen.org/lwt/"; - description = "A cooperative threads library for OCaml"; - maintainers = [ stdenv.lib.maintainers.vbgl ]; - license = stdenv.lib.licenses.lgpl21; - inherit (ocaml.meta) platforms; - }; -} diff --git a/pkgs/development/ocaml-modules/lwt/4.x.nix b/pkgs/development/ocaml-modules/lwt/4.x.nix index 4850a853ea0..3ec3574ea09 100644 --- a/pkgs/development/ocaml-modules/lwt/4.x.nix +++ b/pkgs/development/ocaml-modules/lwt/4.x.nix @@ -1,5 +1,5 @@ { lib, fetchzip, pkgconfig, ncurses, libev, buildDunePackage, ocaml -, cppo, ocaml-migrate-parsetree, ppx_tools_versioned, result +, cppo, ocaml-migrate-parsetree, ocplib-endian, result , mmap, seq }: @@ -7,22 +7,17 @@ let inherit (lib) optional versionAtLeast; in buildDunePackage rec { pname = "lwt"; - version = "4.2.1"; + version = "4.4.0"; src = fetchzip { url = "https://github.com/ocsigen/${pname}/archive/${version}.tar.gz"; - sha256 = "1hz24fyhpm7d6603v399pgxvdl236srwagqja41ljvjx83y10ysr"; + sha256 = "1l97zdcql7y13fhaq0m9n9xvxf712jg0w70r72fvv6j49xm4nlhi"; }; - postPatch = '' - substituteInPlace lwt.opam \ - --replace 'version: "dev"' 'version: "${version}"' - ''; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ cppo ocaml-migrate-parsetree ppx_tools_versioned ] + buildInputs = [ cppo ocaml-migrate-parsetree ] ++ optional (!versionAtLeast ocaml.version "4.07") ncurses; - propagatedBuildInputs = [ libev mmap seq result ]; + propagatedBuildInputs = [ libev mmap ocplib-endian seq result ]; meta = { homepage = "https://ocsigen.org/lwt/"; diff --git a/pkgs/development/ocaml-modules/lwt/legacy.nix b/pkgs/development/ocaml-modules/lwt/legacy.nix index e6ef82a9008..c540124d104 100644 --- a/pkgs/development/ocaml-modules/lwt/legacy.nix +++ b/pkgs/development/ocaml-modules/lwt/legacy.nix @@ -52,7 +52,7 @@ buildOcaml { license = licenses.lgpl21; platforms = ocaml.meta.platforms or []; maintainers = with maintainers; [ - z77z vbgl gal_bolle + maggesi vbgl gal_bolle ]; }; } diff --git a/pkgs/development/ocaml-modules/lwt/ppx.nix b/pkgs/development/ocaml-modules/lwt/ppx.nix index fbd061a6566..4ad6fc2c471 100644 --- a/pkgs/development/ocaml-modules/lwt/ppx.nix +++ b/pkgs/development/ocaml-modules/lwt/ppx.nix @@ -5,8 +5,7 @@ buildDunePackage { inherit (lwt) src version; - buildInputs = [ ppx_tools_versioned ]; - propagatedBuildInputs = [ lwt ]; + propagatedBuildInputs = [ lwt ppx_tools_versioned ]; meta = { description = "Ppx syntax extension for Lwt"; diff --git a/pkgs/development/ocaml-modules/magic-mime/default.nix b/pkgs/development/ocaml-modules/magic-mime/default.nix index 65acbd6cc42..16e37addd45 100644 --- a/pkgs/development/ocaml-modules/magic-mime/default.nix +++ b/pkgs/development/ocaml-modules/magic-mime/default.nix @@ -11,7 +11,9 @@ stdenv.mkDerivation { sha256 = "058d83hmxd5mjccxdm3ydchmhk2lca5jdg82jg0klsigmf4ida6v"; }; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib ]; + configurePlatforms = []; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/mdx/default.nix b/pkgs/development/ocaml-modules/mdx/default.nix index 0b43cf461e0..43c6c8e41fa 100644 --- a/pkgs/development/ocaml-modules/mdx/default.nix +++ b/pkgs/development/ocaml-modules/mdx/default.nix @@ -1,24 +1,30 @@ -{ lib, fetchFromGitHub, buildDunePackage, ocaml, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml_lwt, pandoc, re }: +{ lib, fetchurl, buildDunePackage, opaline, ocaml +, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml-version, ocaml_lwt, pandoc, re }: buildDunePackage rec { pname = "mdx"; - version = "1.4.0"; + version = "1.5.0"; - src = fetchFromGitHub { - owner = "realworldocaml"; - repo = pname; - rev = version; - sha256 = "0ljd00d261s2wf7cab086asqi39icf9zs4nylni6dldaqb027d4w"; + src = fetchurl { + url = "https://github.com/realworldocaml/mdx/releases/download/1.5.0/mdx-1.5.0.tbz"; + sha256 = "0g45plf4z7d178gp0bx7842fwbd3m19679yfph3s95da6mrfm3xn"; }; nativeBuildInputs = [ cppo ]; - buildInputs = [ astring cmdliner fmt logs ocaml-migrate-parsetree re ]; + buildInputs = [ cmdliner ]; + propagatedBuildInputs = [ astring fmt logs ocaml-migrate-parsetree ocaml-version re ]; checkInputs = lib.optionals doCheck [ ocaml_lwt pandoc ]; - doCheck = !lib.versionAtLeast ocaml.version "4.08"; + doCheck = true; dontStrip = lib.versions.majorMinor ocaml.version == "4.04"; + outputs = [ "bin" "lib" "out" ]; + + installPhase = '' + ${opaline}/bin/opaline -prefix $bin -libdir $lib/lib/ocaml/${ocaml.version}/site-lib + ''; + meta = { homepage = https://github.com/realworldocaml/mdx; description = "Executable OCaml code blocks inside markdown files"; diff --git a/pkgs/development/ocaml-modules/menhir/generic.nix b/pkgs/development/ocaml-modules/menhir/generic.nix index d767c20f638..fad11ccedaa 100644 --- a/pkgs/development/ocaml-modules/menhir/generic.nix +++ b/pkgs/development/ocaml-modules/menhir/generic.nix @@ -38,6 +38,6 @@ stdenv.mkDerivation { lgpl2 /* library */ ]; platforms = ocaml.meta.platforms or []; - maintainers = with maintainers; [ z77z ]; + maintainers = with maintainers; [ maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/metrics/default.nix b/pkgs/development/ocaml-modules/metrics/default.nix new file mode 100644 index 00000000000..893b667f836 --- /dev/null +++ b/pkgs/development/ocaml-modules/metrics/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchurl, buildDunePackage, alcotest, fmt }: + +buildDunePackage rec { + pname = "metrics"; + version = "0.1.0"; + + minimumOCamlVersion = "4.04"; + + src = fetchurl { + url = "https://github.com/mirage/metrics/releases/download/${version}/metrics-${version}.tbz"; + sha256 = "0jy88anrx3rh19046rrbrjmx922zvz3wlqkk8asilqv9pbvpnp1a"; + }; + + propagatedBuildInputs = [ fmt ]; + + checkInputs = lib.optional doCheck alcotest; + + doCheck = true; + + meta = { + description = "Metrics infrastructure for OCaml"; + homepage = "https://github.com/mirage/metrics"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/metrics/lwt.nix b/pkgs/development/ocaml-modules/metrics/lwt.nix new file mode 100644 index 00000000000..47b91e430c6 --- /dev/null +++ b/pkgs/development/ocaml-modules/metrics/lwt.nix @@ -0,0 +1,14 @@ +{ buildDunePackage, ocaml_lwt, metrics }: + +buildDunePackage { + pname = "metrics-lwt"; + + inherit (metrics) version src; + + propagatedBuildInputs = [ ocaml_lwt metrics ]; + + meta = metrics.meta // { + description = "Lwt backend for the Metrics library"; + }; + +} diff --git a/pkgs/development/ocaml-modules/metrics/unix.nix b/pkgs/development/ocaml-modules/metrics/unix.nix new file mode 100644 index 00000000000..45a92f10803 --- /dev/null +++ b/pkgs/development/ocaml-modules/metrics/unix.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, gnuplot, ocaml_lwt, metrics, metrics-lwt, mtime, uuidm }: + +buildDunePackage rec { + + pname = "metrics-unix"; + + inherit (metrics) version src; + + propagatedBuildInputs = [ gnuplot ocaml_lwt metrics mtime uuidm ]; + + checkInputs = lib.optional doCheck metrics-lwt; + + doCheck = true; + + meta = metrics.meta // { + description = "Unix backend for the Metrics library"; + }; + +} diff --git a/pkgs/development/ocaml-modules/mtime/default.nix b/pkgs/development/ocaml-modules/mtime/default.nix index f86909cc10b..02d6380715b 100644 --- a/pkgs/development/ocaml-modules/mtime/default.nix +++ b/pkgs/development/ocaml-modules/mtime/default.nix @@ -23,7 +23,8 @@ stdenv.mkDerivation { inherit (param) sha256; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ] + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg ] ++ stdenv.lib.optional jsooSupport js_of_ocaml; buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}"; diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix index 06a87c072b4..833da3bb67c 100644 --- a/pkgs/development/ocaml-modules/nocrypto/default.nix +++ b/pkgs/development/ocaml-modules/nocrypto/default.nix @@ -1,11 +1,19 @@ { stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, topkg , cpuid, ocb-stubblr, sexplib -, cstruct, zarith, ppx_sexp_conv, ppx_deriving +, cstruct, zarith, ppx_sexp_conv, ppx_deriving, writeScriptBin , cstruct-lwt ? null }: with stdenv.lib; -let withLwt = cstruct-lwt != null; in +let + withLwt = cstruct-lwt != null; + # the build system will call 'cc' with no way to override + # this is wrong when we're cross-compiling, so insert a wrapper + cc-wrapper = writeScriptBin "cc" '' + set -e + $CC "$@" + ''; +in stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-nocrypto-${version}"; @@ -43,7 +51,8 @@ stdenv.mkDerivation rec { }) ]; - buildInputs = [ ocaml findlib ocamlbuild topkg cpuid ocb-stubblr ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild cc-wrapper ]; + buildInputs = [ ocamlbuild findlib topkg cpuid ocb-stubblr ]; propagatedBuildInputs = [ cstruct ppx_deriving ppx_sexp_conv sexplib zarith ] ++ optional withLwt cstruct-lwt; buildPhase = "${topkg.buildPhase} --with-lwt ${boolToString withLwt}"; diff --git a/pkgs/development/ocaml-modules/num/default.nix b/pkgs/development/ocaml-modules/num/default.nix index d46bff5b3d5..022b7af9629 100644 --- a/pkgs/development/ocaml-modules/num/default.nix +++ b/pkgs/development/ocaml-modules/num/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, ocaml, findlib, withStatic ? false }: stdenv.mkDerivation rec { version = "1.1"; @@ -14,12 +14,14 @@ stdenv.mkDerivation rec { url = "https://github.com/ocaml/num/commit/6d4c6d476c061298e6385e8a0864f083194b9307.patch"; sha256 = "18zlvb5n327q8y3c52js5dvyy29ssld1l53jqng8m9w1k24ypi0b"; }) - ]; + ] ++ lib.optional withStatic ./enable-static.patch; - buildInputs = [ ocaml findlib ]; + nativeBuildInputs = [ ocaml findlib ]; + buildInputs = [ ocaml findlib ]; createFindlibDestdir = true; + meta = { description = "Legacy Num library for arbitrary-precision integer and rational arithmetic"; license = stdenv.lib.licenses.lgpl21; diff --git a/pkgs/development/ocaml-modules/num/enable-static.patch b/pkgs/development/ocaml-modules/num/enable-static.patch new file mode 100644 index 00000000000..be3ca197f4e --- /dev/null +++ b/pkgs/development/ocaml-modules/num/enable-static.patch @@ -0,0 +1,12 @@ +diff -u a/src/Makefile b/src/Makefile +--- a/src/Makefile ++++ b/src/Makefile +@@ -45,7 +45,7 @@ + endif + + libnums.$(A): $(COBJS) +- $(OCAMLMKLIB) -oc nums $(COBJS) ++ $(OCAMLMKLIB) -custom -oc nums $(COBJS) + + nums.cma: $(CMOS) + $(OCAMLMKLIB) -o nums -oc nums -linkall $(CMOS) diff --git a/pkgs/development/ocaml-modules/ocaml-version/default.nix b/pkgs/development/ocaml-modules/ocaml-version/default.nix new file mode 100644 index 00000000000..45761e98049 --- /dev/null +++ b/pkgs/development/ocaml-modules/ocaml-version/default.nix @@ -0,0 +1,22 @@ +{ lib, fetchurl, buildDunePackage, result }: + +buildDunePackage rec { + + pname = "ocaml-version"; + version = "2.3.0"; + + src = fetchurl { + url = "https://github.com/ocurrent/ocaml-version/releases/download/v${version}/ocaml-version-v${version}.tbz"; + sha256 = "0c711lifl35xila9k0rvhijy9zm3shd37q3jgw7xf01hn1swg0hn"; + }; + + propagatedBuildInputs = [ result ]; + + meta = { + description = "Manipulate, parse and generate OCaml compiler version strings"; + homepage = "https://github.com/ocurrent/ocaml-version"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/ocamlgraph/default.nix b/pkgs/development/ocaml-modules/ocamlgraph/default.nix index 887dce58689..a39e72d3880 100644 --- a/pkgs/development/ocaml-modules/ocamlgraph/default.nix +++ b/pkgs/development/ocaml-modules/ocamlgraph/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, ocaml, findlib, lablgtk}: +{stdenv, fetchurl, ocaml, findlib, lablgtk ? null}: stdenv.mkDerivation rec { pname = "ocamlgraph"; @@ -16,7 +16,8 @@ stdenv.mkDerivation rec { postPatch = '' sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(DESTDIR)/lib/ocaml/${ocaml.version}/site-lib/ocamlgraph@' Makefile.in sed -i 's@OCAMLFINDDEST := -destdir $(DESTDIR)@@' Makefile.in - sed -i 's@+lablgtk2@${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 -I ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/stublibs@' configure Makefile.in editor/Makefile + ${stdenv.lib.optionalString (lablgtk != null) + "sed -i 's@+lablgtk2@${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2 -I ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/stublibs@' configure Makefile.in editor/Makefile"} ''; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/ocamlnat/default.nix b/pkgs/development/ocaml-modules/ocamlnat/default.nix index 468e387f8f1..d6281e00fde 100644 --- a/pkgs/development/ocaml-modules/ocamlnat/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnat/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ''; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/ocamlnet/default.nix b/pkgs/development/ocaml-modules/ocamlnet/default.nix index 33f32879211..fe276ac6e94 100644 --- a/pkgs/development/ocaml-modules/ocamlnet/default.nix +++ b/pkgs/development/ocaml-modules/ocamlnet/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation { license = "Most Ocamlnet modules are released under the zlib/png license. The HTTP server module Nethttpd is, however, under the GPL."; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/pkgs/development/ocaml-modules/ocsigen-server/default.nix index 426fecf3915..9b0b8c433c2 100644 --- a/pkgs/development/ocaml-modules/ocsigen-server/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-server/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { '' rm -rf $out/var/run wrapProgram $out/bin/ocsigenserver \ - --prefix CAML_LD_LIBRARY_PATH : "$CAML_LD_LIBRARY_PATH:${mkpath ssl "ssl"}:${mkpath ocamlnet "netsys"}:${mkpath ocamlnet "netstring"}:${mkpath ocaml_pcre "pcre"}:${mkpath ocaml_sqlite3 "sqlite3"}" + --suffix CAML_LD_LIBRARY_PATH : "${mkpath ssl "ssl"}:${mkpath ocamlnet "netsys"}:${mkpath ocamlnet "netstring"}:${mkpath ocaml_pcre "pcre"}:${mkpath ocaml_sqlite3 "sqlite3"}" ''; dontPatchShebangs = true; diff --git a/pkgs/development/ocaml-modules/ocurl/default.nix b/pkgs/development/ocaml-modules/ocurl/default.nix index 8c8d4519249..a1e524a8642 100644 --- a/pkgs/development/ocaml-modules/ocurl/default.nix +++ b/pkgs/development/ocaml-modules/ocurl/default.nix @@ -5,10 +5,10 @@ then throw "ocurl is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - name = "ocurl-0.8.2"; + name = "ocurl-0.9.0"; src = fetchurl { url = "http://ygrek.org.ua/p/release/ocurl/${name}.tar.gz"; - sha256 = "1ax3xdlzgb1zg7d0wr9nwgmh6a45a764m0wk8p6mx07ad94hz0q9"; + sha256 = "0v5qzfazaynjv1xy3ds2z5iz0np5mz8g831l91l1mrqz6fr1ah0f"; }; buildInputs = [ pkgconfig ocaml findlib ncurses ]; diff --git a/pkgs/development/ocaml-modules/odn/default.nix b/pkgs/development/ocaml-modules/odn/default.nix index a56a6140f8e..62644c1e971 100644 --- a/pkgs/development/ocaml-modules/odn/default.nix +++ b/pkgs/development/ocaml-modules/odn/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation { license = licenses.lgpl21; platforms = ocaml.meta.platforms or []; maintainers = with maintainers; [ - vbgl z77z + vbgl maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/opam-file-format/default.nix b/pkgs/development/ocaml-modules/opam-file-format/default.nix index 4d308dc78b5..0ca332a2a06 100644 --- a/pkgs/development/ocaml-modules/opam-file-format/default.nix +++ b/pkgs/development/ocaml-modules/opam-file-format/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { installFlags = [ "LIBDIR=$(OCAMLFIND_DESTDIR)" ]; + patches = [ ./optional-static.patch ]; + meta = { description = "Parser and printer for the opam file syntax"; license = stdenv.lib.licenses.lgpl21; diff --git a/pkgs/development/ocaml-modules/opam-file-format/optional-static.patch b/pkgs/development/ocaml-modules/opam-file-format/optional-static.patch new file mode 100644 index 00000000000..5501fdd0c6c --- /dev/null +++ b/pkgs/development/ocaml-modules/opam-file-format/optional-static.patch @@ -0,0 +1,13 @@ +diff -u a/Makefile b/Makefile +--- a/Makefile ++++ b/Makefile +@@ -1,1 +1,5 @@ +-TARGETS = opam-file-format.cma opam-file-format.cmxa opam-file-format.cmxs ++TARGETS = opam-file-format.cma opam-file-format.cmxa ++ ++ifeq "$(NATDYNLINK)" "true" ++TARGETS = $(TARGETS) opam-file-format.cmxs ++endif + +all: $(TARGETS) + diff --git a/pkgs/development/ocaml-modules/ounit/default.nix b/pkgs/development/ocaml-modules/ounit/default.nix index 533a41cc435..6f4536f2e8b 100644 --- a/pkgs/development/ocaml-modules/ounit/default.nix +++ b/pkgs/development/ocaml-modules/ounit/default.nix @@ -14,7 +14,9 @@ stdenv.mkDerivation { sha256 = "0hbd2sqdz75lv5ax82yhsfdk1dlcvq12xpys6n85ysmrl0c3d3lk"; }); - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib ]; + configurePlatforms = []; dontAddPrefix = true; @@ -30,7 +32,7 @@ stdenv.mkDerivation { license = stdenv.lib.licenses.mit; platforms = ocaml.meta.platforms or []; maintainers = [ - stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/owl-base/default.nix b/pkgs/development/ocaml-modules/owl-base/default.nix new file mode 100644 index 00000000000..12cd5436308 --- /dev/null +++ b/pkgs/development/ocaml-modules/owl-base/default.nix @@ -0,0 +1,25 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, stdlib-shims }: + +buildDunePackage rec { + pname = "owl-base"; + version = "0.7.2"; + + src = fetchFromGitHub { + owner = "owlbarn"; + repo = "owl"; + rev = version; + sha256 = "1a2lbhywrb3bmm4k48wwbp6iszpd3aj1f23v10i78cbqm5slk6dj"; + }; + + propagatedBuildInputs = [ stdlib-shims ]; + + minimumOCamlVersion = "4.06"; + + meta = with stdenv.lib; { + description = "Numerical computing library for Ocaml"; + homepage = "https://ocaml.xyz"; + platforms = platforms.x86_64; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.mit; + }; +} diff --git a/pkgs/development/ocaml-modules/owl/default.nix b/pkgs/development/ocaml-modules/owl/default.nix new file mode 100644 index 00000000000..0cc1c1db42a --- /dev/null +++ b/pkgs/development/ocaml-modules/owl/default.nix @@ -0,0 +1,14 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, alcotest +, eigen, stdio, stdlib-shims, openblasCompat, owl-base +}: + +buildDunePackage rec { + pname = "owl"; + + inherit (owl-base) version src meta; + + checkInputs = [ alcotest ]; + propagatedBuildInputs = [ eigen stdio stdlib-shims openblasCompat owl-base ]; + + doCheck = !stdenv.isDarwin; # https://github.com/owlbarn/owl/issues/462 +} diff --git a/pkgs/development/ocaml-modules/parany/default.nix b/pkgs/development/ocaml-modules/parany/default.nix new file mode 100644 index 00000000000..5c02e3efea0 --- /dev/null +++ b/pkgs/development/ocaml-modules/parany/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, ocamlnet, setcore }: + +buildDunePackage rec { + pname = "parany"; + version = "7.0.0"; + + src = fetchFromGitHub { + owner = "UnixJunkie"; + repo = pname; + rev = "v${version}"; + sha256 = "0kylhgi1d4gj68x40ifli7pnrxkdc6ks5mgfvlcsigqg8i8nvc7q"; + }; + + propagatedBuildInputs = [ ocamlnet setcore ]; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Generalized map/reduce for multicore computing"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl2; + }; +} diff --git a/pkgs/development/ocaml-modules/pcre/default.nix b/pkgs/development/ocaml-modules/pcre/default.nix index 6428670ebb2..7559fc35d8e 100644 --- a/pkgs/development/ocaml-modules/pcre/default.nix +++ b/pkgs/development/ocaml-modules/pcre/default.nix @@ -21,6 +21,6 @@ stdenv.mkDerivation rec { description = "An efficient C-library for pattern matching with Perl-style regular expressions in OCaml"; license = licenses.lgpl21; platforms = ocaml.meta.platforms or []; - maintainers = with maintainers; [ z77z vbmithr ]; + maintainers = with maintainers; [ maggesi vbmithr ]; }; } diff --git a/pkgs/development/ocaml-modules/phylogenetics/default.nix b/pkgs/development/ocaml-modules/phylogenetics/default.nix new file mode 100644 index 00000000000..e665a323578 --- /dev/null +++ b/pkgs/development/ocaml-modules/phylogenetics/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, ppx_deriving +, alcotest, biocaml, gnuplot, lacaml, menhir, owl }: + +buildDunePackage rec { + pname = "phylogenetics"; + version = "unstable-2019-11-15"; + + src = fetchFromGitHub { + owner = "biocaml"; + repo = pname; + rev = "91c03834db065cf4a86f33affbb9cfd216defc9f"; + sha256 = "0i9m0633a6a724as35ix8z3p1gj267cl0hmqrpw4qfq39zxmgnxb"; + }; + + minimumOCamlVersion = "4.08"; # e.g., uses Float.min + + checkInputs = [ alcotest ]; + propagatedBuildInputs = [ biocaml gnuplot lacaml menhir owl ppx_deriving ]; + + doCheck = false; # many tests require bppsuite + + meta = with stdenv.lib; { + inherit (std.meta) homepage; + description = "Bioinformatics library for Ocaml"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.cecill-b; + }; +} diff --git a/pkgs/development/ocaml-modules/ppx_deriving_rpc/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_rpc/default.nix index 7746200d4ff..92d73e540f4 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving_rpc/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving_rpc/default.nix @@ -1,11 +1,11 @@ -{ lib, buildDunePackage, rpclib, ppxfind, ppx_deriving, cppo }: +{ lib, buildDunePackage, rpclib, ppxlib, ppx_deriving }: buildDunePackage rec { pname = "ppx_deriving_rpc"; inherit (rpclib) version src; - buildInputs = [ ppxfind cppo ]; + buildInputs = [ ppxlib ]; propagatedBuildInputs = [ rpclib ppx_deriving ]; diff --git a/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix b/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix index 5d45ee90c2e..b09ff9c7f22 100644 --- a/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix +++ b/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix @@ -2,13 +2,13 @@ buildDunePackage rec { pname = "ppx_gen_rec"; - version = "1.0.0"; + version = "1.1.0"; minimumOCamlVersion = "4.01"; src = fetchurl { - url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; - sha256 = "0qy0wa3rd5yh1612jijadi1yddfslpsmmmf69phi2dhr3vmkhza7"; + url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0fwi4bknq8h9zgpsarjvnzdm9bm8qlyyw0lz30pihg02aiiljqbh"; }; buildInputs = [ ocaml-migrate-parsetree ]; diff --git a/pkgs/development/ocaml-modules/ppx_tools/default.nix b/pkgs/development/ocaml-modules/ppx_tools/default.nix index fd2b67225e6..984906342bc 100644 --- a/pkgs/development/ocaml-modules/ppx_tools/default.nix +++ b/pkgs/development/ocaml-modules/ppx_tools/default.nix @@ -37,6 +37,7 @@ in inherit (param) sha256; }; + nativeBuildInputs = [ ocaml findlib ]; buildInputs = [ ocaml findlib ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/printbox/default.nix b/pkgs/development/ocaml-modules/printbox/default.nix index 50866e1d969..555ccef3495 100644 --- a/pkgs/development/ocaml-modules/printbox/default.nix +++ b/pkgs/development/ocaml-modules/printbox/default.nix @@ -13,7 +13,7 @@ buildDunePackage rec { sha256 = "16nwwpp13hzlcm9xqfxc558afm3i5s802dkj69l9s2vp04lgms5n"; }; - checkInputs = lib.optional doCheck mdx; + checkInputs = lib.optional doCheck mdx.bin; doCheck = !lib.versionAtLeast ocaml.version "4.08"; diff --git a/pkgs/development/ocaml-modules/ptime/default.nix b/pkgs/development/ocaml-modules/ptime/default.nix index f21f05eeae5..de3d940b3bb 100644 --- a/pkgs/development/ocaml-modules/ptime/default.nix +++ b/pkgs/development/ocaml-modules/ptime/default.nix @@ -9,7 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg js_of_ocaml ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + buildInputs = [ findlib topkg js_of_ocaml ]; propagatedBuildInputs = [ result ]; diff --git a/pkgs/development/ocaml-modules/react/default.nix b/pkgs/development/ocaml-modules/react/default.nix index 74789636896..7baf8b743be 100644 --- a/pkgs/development/ocaml-modules/react/default.nix +++ b/pkgs/development/ocaml-modules/react/default.nix @@ -17,6 +17,6 @@ stdenv.mkDerivation { description = "Applicative events and signals for OCaml"; license = licenses.bsd3; platforms = ocaml.meta.platforms or []; - maintainers = with maintainers; [ z77z vbmithr gal_bolle]; + maintainers = with maintainers; [ maggesi vbmithr gal_bolle]; }; } diff --git a/pkgs/development/ocaml-modules/rope/default.nix b/pkgs/development/ocaml-modules/rope/default.nix index b797af0a702..0223d4f59ff 100644 --- a/pkgs/development/ocaml-modules/rope/default.nix +++ b/pkgs/development/ocaml-modules/rope/default.nix @@ -2,10 +2,10 @@ let param = if stdenv.lib.versionAtLeast ocaml.version "4.03" - then { - version = "0.6.1"; - url = " https://github.com/Chris00/ocaml-rope/releases/download/0.6.1/rope-0.6.1.tbz"; - sha256 = "1zqh28jz1zjb0l354wi1046qpkwmk582ssz0gsqh6d44wpspdxk2"; + then rec { + version = "0.6.2"; + url = "https://github.com/Chris00/ocaml-rope/releases/download/${version}/rope-${version}.tbz"; + sha256 = "15cvfa0s1vjx7gjd07d3fkznilishqf4z4h2q5f20wm9ysjh2h2i"; buildInputs = [ dune ]; extra = { buildPhase = "dune build -p rope"; diff --git a/pkgs/development/ocaml-modules/rpclib/default.nix b/pkgs/development/ocaml-modules/rpclib/default.nix index 2b4ab181859..a4134f592b3 100644 --- a/pkgs/development/ocaml-modules/rpclib/default.nix +++ b/pkgs/development/ocaml-modules/rpclib/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchFromGitHub, buildDunePackage, alcotest, cmdliner, rresult, result, xmlm, yojson }: +{ lib, fetchFromGitHub, buildDunePackage, alcotest, cmdliner, rresult, result, xmlm, yojson }: buildDunePackage rec { pname = "rpclib"; - version = "5.9.0"; + version = "6.0.0"; minimumOCamlVersion = "4.04"; @@ -10,7 +10,7 @@ buildDunePackage rec { owner = "mirage"; repo = "ocaml-rpc"; rev = "v${version}"; - sha256 = "1swnnmmnkn53mxqpckdnd1j8bz0wksqznjbv0zamspxyqybmancq"; + sha256 = "0bmr20sj7kybjjlwd42irj0f5zlnxcw7mxa1mdgxkki9bmhsqr51"; }; buildInputs = [ alcotest cmdliner yojson ]; @@ -18,7 +18,7 @@ buildDunePackage rec { doCheck = true; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/mirage/ocaml-rpc"; description = "Light library to deal with RPCs in OCaml"; license = licenses.isc; diff --git a/pkgs/development/ocaml-modules/setcore/default.nix b/pkgs/development/ocaml-modules/setcore/default.nix new file mode 100644 index 00000000000..c2fd9aab3ba --- /dev/null +++ b/pkgs/development/ocaml-modules/setcore/default.nix @@ -0,0 +1,29 @@ +{ stdenv, buildDunePackage, fetchFromGitHub, autoconf }: + +buildDunePackage rec { + pname = "setcore"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "UnixJunkie"; + repo = pname; + rev = "v${version}"; + sha256 = "1yn660gxk2ccp7lbdq9v6pjz1c3pm08s9dl9k9l5492ld6bx8fxc"; + }; + + preConfigure = '' + autoconf + autoheader + ''; + + buildInputs = [ autoconf ]; + + hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow"; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "Generalized map/reduce for multicore computing"; + maintainers = [ maintainers.bcdarwin ]; + license = licenses.lgpl2; + }; +} diff --git a/pkgs/development/ocaml-modules/sodium/default.nix b/pkgs/development/ocaml-modules/sodium/default.nix new file mode 100644 index 00000000000..8c8895d4520 --- /dev/null +++ b/pkgs/development/ocaml-modules/sodium/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, ctypes, libsodium }: + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-sodium"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "dsheets"; + repo = "ocaml-sodium"; + rev = version; + sha256 = "124gpi1jhac46x05gp5viykyrafnlp03v1cmkl13c6pgcs8w04pv"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ ctypes libsodium ]; + + createFindlibDestdir = true; + + hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow"; + + meta = with stdenv.lib; { + homepage = https://github.com/dsheets/ocaml-sodium; + description = "Binding to libsodium 1.0.9+"; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.rixed ]; + }; +} diff --git a/pkgs/development/ocaml-modules/sqlite3/default.nix b/pkgs/development/ocaml-modules/sqlite3/default.nix index 0b3f13bc54f..53b11f285a6 100644 --- a/pkgs/development/ocaml-modules/sqlite3/default.nix +++ b/pkgs/development/ocaml-modules/sqlite3/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { license = licenses.mit; platforms = ocaml.meta.platforms or []; maintainers = with maintainers; [ - z77z vbgl + maggesi vbgl ]; }; } diff --git a/pkgs/development/ocaml-modules/ssl/default.nix b/pkgs/development/ocaml-modules/ssl/default.nix index 5ee77425a2f..3086558e3eb 100644 --- a/pkgs/development/ocaml-modules/ssl/default.nix +++ b/pkgs/development/ocaml-modules/ssl/default.nix @@ -19,7 +19,7 @@ buildDunePackage rec { description = "OCaml bindings for libssl "; license = "LGPL+link exception"; maintainers = [ - lib.maintainers.z77z + lib.maintainers.maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/stdint/default.nix b/pkgs/development/ocaml-modules/stdint/default.nix index 0b8f83a1ea3..a36d84ffa3a 100644 --- a/pkgs/development/ocaml-modules/stdint/default.nix +++ b/pkgs/development/ocaml-modules/stdint/default.nix @@ -1,26 +1,20 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, dune }: +{ stdenv, fetchFromGitHub, buildDunePackage }: -stdenv.mkDerivation rec { +buildDunePackage rec { pname = "stdint"; - name = "ocaml${ocaml.version}-${pname}-${version}"; - version = "0.5.1"; + version = "0.6.0"; + src = fetchFromGitHub { owner = "andrenth"; repo = "ocaml-stdint"; rev = version; - sha256 = "0z2z77m3clna9m9k0f8fd1400cdlglvy1kr893qs3907b3v0c057"; + sha256 = "19ccxs0vij81vyc9nqc9kbr154ralb9dgc2y2nr71a5xkx6xfn0y"; }; - buildInputs = [ ocaml findlib dune ]; - - buildPhase = "dune build -p ${pname}"; - inherit (dune) installPhase; - meta = { description = "Various signed and unsigned integers for OCaml"; + homepage = "https://github.com/andrenth/ocaml-stdint"; license = stdenv.lib.licenses.mit; maintainers = [ stdenv.lib.maintainers.gebner ]; - inherit (src.meta) homepage; - inherit (ocaml.meta) platforms; }; } diff --git a/pkgs/development/ocaml-modules/tls/default.nix b/pkgs/development/ocaml-modules/tls/default.nix index b1a178128ad..80d9933f8b6 100644 --- a/pkgs/development/ocaml-modules/tls/default.nix +++ b/pkgs/development/ocaml-modules/tls/default.nix @@ -21,7 +21,8 @@ stdenv.mkDerivation rec { sha256 = "02wv4lia583imn3sfci4nqv6ac5nzig5j3yfdnlqa0q8bp9rfc6g"; }; - buildInputs = [ ocaml ocamlbuild findlib topkg ppx_sexp_conv ppx_cstruct ] + nativeBuildInputs = [ ocaml ocamlbuild findlib ]; + buildInputs = [ findlib topkg ppx_sexp_conv ppx_cstruct ] ++ optionals doCheck [ ounit cstruct-unix ]; propagatedBuildInputs = [ cstruct-sexp nocrypto result x509 ] ++ optional withLwt lwt; diff --git a/pkgs/development/ocaml-modules/topkg/default.nix b/pkgs/development/ocaml-modules/topkg/default.nix index a3e718d5329..edbbec3dcb3 100644 --- a/pkgs/development/ocaml-modules/topkg/default.nix +++ b/pkgs/development/ocaml-modules/topkg/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { sha256 = "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw"; }; - buildInputs = [ ocaml findlib ocamlbuild ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; propagatedBuildInputs = [ result ]; buildPhase = "${run} build"; diff --git a/pkgs/development/ocaml-modules/type_conv/108.08.00.nix b/pkgs/development/ocaml-modules/type_conv/108.08.00.nix index f17e5a7b89e..f2e272ed395 100644 --- a/pkgs/development/ocaml-modules/type_conv/108.08.00.nix +++ b/pkgs/development/ocaml-modules/type_conv/108.08.00.nix @@ -22,6 +22,6 @@ stdenv.mkDerivation { license = licenses.asl20; branch = "108"; platforms = ocaml.meta.platforms or []; - maintainers = with maintainers; [ z77z ]; + maintainers = with maintainers; [ maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/type_conv/109.60.01.nix b/pkgs/development/ocaml-modules/type_conv/109.60.01.nix index c54642afb41..706554bc027 100644 --- a/pkgs/development/ocaml-modules/type_conv/109.60.01.nix +++ b/pkgs/development/ocaml-modules/type_conv/109.60.01.nix @@ -21,6 +21,6 @@ stdenv.mkDerivation { description = "Support library for OCaml preprocessor type conversions"; license = stdenv.lib.licenses.lgpl21; platforms = ocaml.meta.platforms or []; - maintainers = with stdenv.lib.maintainers; [ z77z ]; + maintainers = with stdenv.lib.maintainers; [ maggesi ]; }; } diff --git a/pkgs/development/ocaml-modules/type_conv/112.01.01.nix b/pkgs/development/ocaml-modules/type_conv/112.01.01.nix index c50d08dd144..f6c1ec9ad06 100644 --- a/pkgs/development/ocaml-modules/type_conv/112.01.01.nix +++ b/pkgs/development/ocaml-modules/type_conv/112.01.01.nix @@ -15,6 +15,6 @@ buildOcaml rec { homepage = https://github.com/janestreet/type_conv/; description = "Support library for preprocessor type conversions"; license = stdenv.lib.licenses.asl20; - maintainers = with stdenv.lib.maintainers; [ z77z ericbmerritt ]; + maintainers = with stdenv.lib.maintainers; [ maggesi ericbmerritt ]; }; } diff --git a/pkgs/development/ocaml-modules/uchar/default.nix b/pkgs/development/ocaml-modules/uchar/default.nix index c943d3ce35a..2140871021d 100644 --- a/pkgs/development/ocaml-modules/uchar/default.nix +++ b/pkgs/development/ocaml-modules/uchar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline }: +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true }: stdenv.mkDerivation { name = "ocaml${ocaml.version}-uchar-0.0.2"; @@ -8,9 +8,11 @@ stdenv.mkDerivation { sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"; }; - buildInputs = [ ocaml ocamlbuild findlib opaline ]; - buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; + nativeBuildInputs = [ ocaml ocamlbuild findlib opaline ]; + buildInputs = [ findlib ocaml ocamlbuild opaline ]; + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${if withShared then "true" else "false"}"; installPhase = "opaline -libdir $OCAMLFIND_DESTDIR"; + configurePlatforms = []; meta = { description = "Compatibility library for OCaml’s Uchar module"; diff --git a/pkgs/development/ocaml-modules/uuidm/default.nix b/pkgs/development/ocaml-modules/uuidm/default.nix index 079e810bfdc..497b2df88b1 100644 --- a/pkgs/development/ocaml-modules/uuidm/default.nix +++ b/pkgs/development/ocaml-modules/uuidm/default.nix @@ -8,7 +8,9 @@ stdenv.mkDerivation rec { sha256 = "1ivxb3hxn9bk62rmixx6px4fvn52s4yr1bpla7rgkcn8981v45r8"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ]; + nativeBuildInputs = [ ocaml findlib ocamlbuild ]; + configurePlatforms = []; + buildInputs = [ topkg cmdliner ]; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/uutf/default.nix b/pkgs/development/ocaml-modules/uutf/default.nix index 863a4cbb840..f289781b422 100644 --- a/pkgs/development/ocaml-modules/uutf/default.nix +++ b/pkgs/development/ocaml-modules/uutf/default.nix @@ -13,7 +13,8 @@ stdenv.mkDerivation rec { sha256 = "1nx1rly3qj23jzn9yk3x6fwqimcxjd84kv5859vvhdg56psq26p6"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ]; + nativeBuildInputs = [ ocaml ocamlbuild findlib ]; + buildInputs = [ findlib topkg cmdliner ]; propagatedBuildInputs = [ uchar ]; inherit (topkg) buildPhase installPhase; diff --git a/pkgs/development/ocaml-modules/webmachine/default.nix b/pkgs/development/ocaml-modules/webmachine/default.nix new file mode 100644 index 00000000000..79e36b66d11 --- /dev/null +++ b/pkgs/development/ocaml-modules/webmachine/default.nix @@ -0,0 +1,32 @@ +{ lib, buildDunePackage, fetchFromGitHub +, cohttp, dispatch, ptime +, ounit +}: + +buildDunePackage rec { + pname = "webmachine"; + version = "0.6.1"; + + minimumOCamlVersion = "4.04"; + + src = fetchFromGitHub { + owner = "inhabitedtype"; + repo = "ocaml-webmachine"; + rev = "${version}"; + sha256 = "0kpbxsvjzylbxmxag77k1c8m8mwn4f4xscqk2i7fc591llgq9fp3"; + }; + + propagatedBuildInputs = [ cohttp dispatch ptime ]; + + checkInputs = lib.optional doCheck ounit; + + doCheck = true; + + meta = { + inherit (src.meta) homepage; + license = lib.licenses.bsd3; + description = "A REST toolkit for OCaml"; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/wtf8/default.nix b/pkgs/development/ocaml-modules/wtf8/default.nix index 4c820d13808..420cb30bb94 100644 --- a/pkgs/development/ocaml-modules/wtf8/default.nix +++ b/pkgs/development/ocaml-modules/wtf8/default.nix @@ -2,13 +2,13 @@ buildDunePackage rec { pname = "wtf8"; - version = "1.0.1"; + version = "1.0.2"; minimumOCamlVersion = "4.02"; src = fetchurl { - url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; - sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq"; + url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "09ygcxxd5warkdzz17rgpidrd0pg14cy2svvnvy1hna080lzg7vp"; }; meta = with stdenv.lib; { diff --git a/pkgs/development/ocaml-modules/yaml/default.nix b/pkgs/development/ocaml-modules/yaml/default.nix new file mode 100644 index 00000000000..31790755357 --- /dev/null +++ b/pkgs/development/ocaml-modules/yaml/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchurl, buildDunePackage +, ppx_sexp_conv +, bos, ctypes, fmt, logs, rresult, sexplib +}: + +buildDunePackage rec { + pname = "yaml"; + version = "2.0.1"; + + src = fetchurl { + url = "https://github.com/avsm/ocaml-yaml/releases/download/v${version}/yaml-v${version}.tbz"; + sha256 = "1r8jj572h416g2zliwmxj2j9hkv73nxnpfb9gmbj9gixg24lskx0"; + }; + + propagatedBuildInputs = [ bos ctypes fmt logs ppx_sexp_conv rresult sexplib ]; + + meta = { + description = "Parse and generate YAML 1.1 files"; + homepage = "https://github.com/avsm/ocaml-yaml"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; + +} diff --git a/pkgs/development/ocaml-modules/yojson/default.nix b/pkgs/development/ocaml-modules/yojson/default.nix index c660ca64856..24942da0072 100644 --- a/pkgs/development/ocaml-modules/yojson/default.nix +++ b/pkgs/development/ocaml-modules/yojson/default.nix @@ -6,7 +6,7 @@ let version = "1.7.0"; url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz"; sha256 = "08llz96if8bcgnaishf18si76cv11zbkni0aldb54k3cn7ipiqvd"; - buildInputs = [ dune ]; + nativeBuildInputs = [ dune ]; extra = { inherit (dune) installPhase; }; } else rec { version = "1.2.3"; @@ -29,13 +29,14 @@ stdenv.mkDerivation ({ inherit (param) url sha256; }; - buildInputs = [ ocaml findlib ] ++ (param.buildInputs or []); - - propagatedBuildInputs = [ cppo easy-format biniou ]; + nativeBuildInputs = [ ocaml findlib ] ++ (param.nativeBuildInputs or []); + propagatedNativeBuildInputs = [ cppo ]; + propagatedBuildInputs = [ easy-format biniou ]; + configurePlatforms = []; meta = with stdenv.lib; { description = "An optimized parsing and printing library for the JSON format"; - homepage = "http://mjambon.com/${pname}.html"; + homepage = "https://github.com/ocaml-community/${pname}"; license = licenses.bsd3; maintainers = [ maintainers.vbgl ]; platforms = ocaml.meta.platforms or []; diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix index c97078c62ed..f0cb5a59485 100644 --- a/pkgs/development/ocaml-modules/zarith/default.nix +++ b/pkgs/development/ocaml-modules/zarith/default.nix @@ -6,9 +6,9 @@ let source = if stdenv.lib.versionAtLeast ocaml.version "4.02" then { - version = "1.9.1"; - url = https://github.com/ocaml/Zarith/archive/release-1.9.1.tar.gz; - sha256 = "0pfa271476dic5pvn6kxz3dfswxs6kqm2cxmhdx5xq2ayca05gj9"; + version = "1.9"; + url = https://github.com/ocaml/Zarith/archive/release-1.9.tar.gz; + sha256 = "1xrqcaj5gp52xp4ybpnblw8ciwlgrr0zi7rg7hnk8x83isjkpmwx"; } else { version = "1.3"; url = http://forge.ocamlcore.org/frs/download.php/1471/zarith-1.3.tgz; @@ -26,9 +26,8 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ gmp ]; patchPhase = "patchShebangs ./z_pp.pl"; - configurePhase = '' - ./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib - ''; + dontAddPrefix = true; + configureFlags = [ "-installdir ${placeholder "out"}/lib/ocaml/${ocaml.version}/site-lib" ]; preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs"; |