diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-23 08:16:49 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-23 08:16:49 +0000 |
commit | 4dc730a187d41f9f2dce4fe2680c32dcecb79b93 (patch) | |
tree | 67673deb1649dc0a40962e70e6da302d7b6c4bf0 /nixpkgs/pkgs/development/ocaml-modules | |
parent | 633cab0ecb07627706c6b523e219490f019eaab5 (diff) | |
parent | 7e567a3d092b7de69cdf5deaeb8d9526de230916 (diff) | |
download | nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.gz nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.bz2 nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.lz nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.xz nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.tar.zst nixlib-4dc730a187d41f9f2dce4fe2680c32dcecb79b93.zip |
Merge commit '7e567a3d092b7de69cdf5deaeb8d9526de230916'
# Conflicts: # nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules')
31 files changed, 580 insertions, 156 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/arp/default.nix b/nixpkgs/pkgs/development/ocaml-modules/arp/default.nix index 518f1c9f4245..d900f2b772e9 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/arp/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/arp/default.nix @@ -8,50 +8,48 @@ buildDunePackage rec { pname = "arp"; - version = "2.3.1"; - - minimumOCamlVersion = "4.06"; - - useDune2 = true; + version = "2.3.2"; src = fetchurl { url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; - sha256 = "1nzm3fbkvz702g8f60fs49736lpffwchy64i1l1raxm9b4lmdk3p"; + sha256 = "1s09ibj9v6pp2ckn96wxmn3mjifcj97asls5xc4zg75pflk0grgz"; }; + minimumOCamlVersion = "4.06"; + useDune2 = true; + nativeBuildInputs = [ bisect_ppx ]; propagatedBuildInputs = [ cstruct + duration ipaddr - macaddr logs - mirage-time - mirage-protocols lwt - duration + macaddr mirage-profile + mirage-protocols + mirage-time ]; doCheck = true; checkInputs = [ alcotest + ethernet + mirage-clock-unix mirage-profile mirage-random mirage-random-test - mirage-vnetif - mirage-clock-unix - mirage-random mirage-time-unix - ethernet + mirage-vnetif ]; meta = with lib; { description = "Address Resolution Protocol purely in OCaml"; - license = licenses.isc; homepage = "https://github.com/mirage/arp"; - maintainers = [ maintainers.sternenseemann ]; + license = licenses.isc; + maintainers = with maintainers; [ sternenseemann ]; }; } diff --git a/nixpkgs/pkgs/development/ocaml-modules/bz2/default.nix b/nixpkgs/pkgs/development/ocaml-modules/bz2/default.nix new file mode 100644 index 000000000000..52a92d3a8d40 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/bz2/default.nix @@ -0,0 +1,41 @@ +{ lib, stdenv, fetchFromGitLab, ocaml, findlib, bzip2, autoreconfHook }: + +if !lib.versionAtLeast ocaml.version "4.02" +then throw "bz2 is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-bz2"; + version = "0.7.0"; + + src = fetchFromGitLab { + owner = "irill"; + repo = "camlbz2"; + rev = version; + sha256 = "sha256-jBFEkLN2fbC3LxTu7C0iuhvNg64duuckBHWZoBxrV/U="; + }; + + autoreconfFlags = "-I ."; + + nativeBuildInputs = [ + autoreconfHook + ]; + + buildInputs = [ + ocaml + findlib + ]; + + propagatedBuildInputs = [ + bzip2 + ]; + + preInstall = "mkdir -p $OCAMLFIND_DESTDIR/stublibs"; + + meta = with lib; { + description = "OCaml bindings for the libbz2 (AKA, bzip2) (de)compression library"; + downloadPage = "https://gitlab.com/irill/camlbz2"; + license = licenses.lgpl21; + maintainers = with maintainers; [ superherointj ]; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/cstruct/1.9.0.nix b/nixpkgs/pkgs/development/ocaml-modules/cstruct/1.9.0.nix deleted file mode 100644 index 750a153c1c48..000000000000 --- a/nixpkgs/pkgs/development/ocaml-modules/cstruct/1.9.0.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, ocaml, ocamlbuild, ocplib-endian, sexplib, findlib, ppx_tools -, async ? null, lwt ? null -}: - -assert lib.versionAtLeast ocaml.version "4.01"; - -let version = "1.9.0"; in - -let opt = b: "--${if b != null then "en" else "dis"}able"; in - -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-cstruct-${version}"; - - src = fetchFromGitHub { - owner = "mirage"; - repo = "ocaml-cstruct"; - rev = "v${version}"; - sha256 = "1c1j21zgmxi9spq23imy7byn50qr7hlds1cfpzxlsx9dp309jngy"; - }; - - configureFlags = [ "${opt lwt}-lwt" "${opt async}-async" "${opt ppx_tools}-ppx" ]; - - buildInputs = [ ocaml findlib ocamlbuild ppx_tools lwt async ]; - propagatedBuildInputs = [ ocplib-endian sexplib ]; - - createFindlibDestdir = true; - dontStrip = true; - - meta = with lib; { - homepage = "https://github.com/mirage/ocaml-cstruct"; - description = "Map OCaml arrays onto C-like structs"; - license = lib.licenses.isc; - maintainers = [ maintainers.vbgl maintainers.ericbmerritt ]; - platforms = ocaml.meta.platforms or []; - }; -} diff --git a/nixpkgs/pkgs/development/ocaml-modules/cstruct/async.nix b/nixpkgs/pkgs/development/ocaml-modules/cstruct/async.nix new file mode 100644 index 000000000000..579f12776c08 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/cstruct/async.nix @@ -0,0 +1,11 @@ +{ lib, buildDunePackage, cstruct, async_unix }: + +buildDunePackage rec { + pname = "cstruct-async"; + inherit (cstruct) src version meta useDune2; + + propagatedBuildInputs = [ + async_unix + cstruct + ]; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/cudf/default.nix b/nixpkgs/pkgs/development/ocaml-modules/cudf/default.nix new file mode 100644 index 000000000000..5bd768e64510 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/cudf/default.nix @@ -0,0 +1,52 @@ +{ lib, fetchurl, stdenv, ocaml, ocamlbuild, findlib, ocaml_extlib, glib, perl, pkg-config, stdlib-shims, ounit }: + +stdenv.mkDerivation { + pname = "ocaml${ocaml.version}-cudf"; + version = "0.9"; + + src = fetchurl { + url = "https://gforge.inria.fr/frs/download.php/36602/cudf-0.9.tar.gz"; + sha256 = "sha256-mTLk2V3OI1sUNIYv84nM3reiirf0AuozG5ZzLCmn4Rw="; + }; + + buildFlags = [ + "all" + "opt" + ]; + nativeBuildInputs = [ + findlib + ocaml + ocamlbuild + pkg-config + ]; + buildInputs = [ + glib + perl + stdlib-shims + ]; + propagatedBuildInputs = [ + ocaml_extlib + ]; + + checkTarget = [ + "all" + "test" + ]; + checkInputs = [ + ounit + ]; + doCheck = true; + + preInstall = "mkdir -p $OCAMLFIND_DESTDIR"; + installFlags = "BINDIR=$(out)/bin"; + + # passthru.tests = { inherit dose3; }; # To-Do: To be enabled when Dose3 PR is accepted. + + meta = with lib; { + description = "A library for CUDF format"; + homepage = "http://www.mancoosi.org/cudf/"; + downloadPage = "https://gforge.inria.fr/projects/cudf/"; + license = licenses.lgpl3; + maintainers = with maintainers; [ superherointj ]; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/fileutils/default.nix b/nixpkgs/pkgs/development/ocaml-modules/fileutils/default.nix index 39c41e8eba04..819298ac8cf1 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/fileutils/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/fileutils/default.nix @@ -1,28 +1,30 @@ -{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, ounit }: +{ lib, fetchurl, buildDunePackage, stdlib-shims, ounit }: -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-fileutils-0.5.3"; +buildDunePackage rec { + pname = "fileutils"; + version = "0.6.3"; src = fetchurl { - url = "https://forge.ocamlcore.org/frs/download.php/1728/ocaml-fileutils-0.5.3.tar.gz"; - sha256 = "1rc4cqlvdhbs55i85zfbfhz938fsy4fj6kwlkfm3ra7bpwn8bmpd"; + url = "https://github.com/gildor478/ocaml-fileutils/releases/download/v${version}/fileutils-v${version}.tbz"; + sha256 = "0qhlhc7fzcq0yfg1wyszsi0gyc4w9hyzmfv84aq9wc79i3283xgg"; }; - buildInputs = [ ocaml findlib ocamlbuild ounit ]; + minimumOCamlVersion = "4.03"; + useDune2 = true; - configureFlags = [ "--enable-tests" ]; - doCheck = true; - checkTarget = "test"; - - createFindlibDestdir = true; + propagatedBuildInputs = [ + stdlib-shims + ]; - preInstall = "make doc"; + checkInputs = [ + ounit + ]; + doCheck = true; - meta = { - homepage = "https://forge.ocamlcore.org/projects/ocaml-fileutils/"; - platforms = ocaml.meta.platforms or []; - description = "Library to provide pure OCaml functions to manipulate real file (POSIX like) and filename"; - license = lib.licenses.lgpl21Plus; - maintainers = with lib.maintainers; [ vbgl ]; + meta = with lib; { + description = "OCaml API to manipulate real files (POSIX like) and filenames"; + homepage = "https://github.com/gildor478/ocaml-fileutils"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ vbgl ]; }; } diff --git a/nixpkgs/pkgs/development/ocaml-modules/index/default.nix b/nixpkgs/pkgs/development/ocaml-modules/index/default.nix index a24d72a34458..61ecb65510cc 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/index/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/index/default.nix @@ -6,29 +6,41 @@ buildDunePackage rec { pname = "index"; - version = "1.3.0"; - - minimumOCamlVersion = "4.08"; - - useDune2 = true; + version = "1.3.1"; src = fetchurl { url = "https://github.com/mirage/index/releases/download/${version}/index-${version}.tbz"; - sha256 = "00qwhwg79scs5bgp8nbppv06qs9yhicf686q7lh64ngh0642iz6n"; + sha256 = "sha256-ycZi/TFLoGRloSpjYqH5FCHWP3eyiTCIDLESEn5inuI="; }; - buildInputs = [ stdlib-shims ]; + minimumOCamlVersion = "4.08"; + useDune2 = true; + + buildInputs = [ + stdlib-shims + ]; propagatedBuildInputs = [ - fmt logs mtime repr ppx_repr cmdliner progress semaphore-compat + cmdliner + fmt + logs + mtime + ppx_repr + progress + repr + semaphore-compat ]; + checkInputs = [ + alcotest + crowbar + re + ]; doCheck = true; - checkInputs = [ alcotest crowbar re ]; - meta = { - homepage = "https://github.com/mirage/index"; + meta = with lib; { description = "A platform-agnostic multi-level index"; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/mirage/index"; + license = licenses.mit; + maintainers = with maintainers; [ vbgl ]; }; } diff --git a/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix b/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix index 2a5ff08c018e..15628bcf26c1 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix @@ -1,27 +1,21 @@ -{ stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild }: +{ lib, fetchurl, buildDunePackage }: -let version = "1.0.0"; in +buildDunePackage rec { + pname = "magic-mime"; + version = "1.1.3"; -stdenv.mkDerivation { - pname = "ocaml-magic-mime"; - inherit version; - - src = fetchzip { - url = "https://github.com/mirage/ocaml-magic-mime/archive/v${version}.tar.gz"; - sha256 = "058d83hmxd5mjccxdm3ydchmhk2lca5jdg82jg0klsigmf4ida6v"; + src = fetchurl { + url = "https://github.com/mirage/ocaml-magic-mime/releases/download/v${version}/magic-mime-v${version}.tbz"; + sha256 = "1xqjs8bba567yzrzgnr88j5ck97d36zw68zr9v29liya37k6rcvz"; }; - nativeBuildInputs = [ ocaml findlib ocamlbuild ]; - buildInputs = [ findlib ]; - configurePlatforms = []; - - createFindlibDestdir = true; + minimalOCamlVersion = "4.03"; + useDune2 = true; - meta = { - homepage = "https://github.com/mirage/ocaml-magic-mime"; + meta = with lib; { description = "Convert file extensions to MIME types"; - platforms = ocaml.meta.platforms or []; - license = lib.licenses.isc; - maintainers = with lib.maintainers; [ vbgl ]; + homepage = "https://github.com/mirage/ocaml-magic-mime"; + license = licenses.isc; + maintainers = with maintainers; [ vbgl ]; }; } diff --git a/nixpkgs/pkgs/development/ocaml-modules/mccs/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mccs/default.nix new file mode 100644 index 000000000000..3b396215e575 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/mccs/default.nix @@ -0,0 +1,29 @@ +{ lib, fetchFromGitHub, buildDunePackage, cudf }: + +buildDunePackage rec { + pname = "mccs"; + version = "1.1+13"; + + src = fetchFromGitHub { + owner = "AltGr"; + repo = "ocaml-mccs"; + rev = version; + sha256 = "sha256-K249E9qkWNK4BC+ynaR3bVEyu9Tk8iCE7GptKk/aVJc="; + }; + + useDune2 = true; + + buildInputs = [ + cudf + ]; + + doCheck = true; + + meta = with lib; { + description = "A library providing a multi criteria CUDF solver, part of MANCOOSI project."; + downloadPage = "https://github.com/AltGr/ocaml-mccs"; + homepage = "https://www.i3s.unice.fr/~cpjm/misc/"; + license = with licenses; [ lgpl21 gpl3 ]; + maintainers = with maintainers; [ superherointj ]; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/default.nix b/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/default.nix index dd16a369881c..d0ec77c4556f 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/opam-file-format/default.nix @@ -1,22 +1,22 @@ -{ lib, buildDunePackage, fetchFromGitHub }: +{ lib, fetchFromGitHub, buildDunePackage }: buildDunePackage rec { - version = "2.1.2"; pname = "opam-file-format"; - - useDune2 = true; + version = "2.1.3"; src = fetchFromGitHub { owner = "ocaml"; repo = pname; rev = version; - sha256 = "19xppn2s3yjid8jc1wh8gdf5mgmlpzby2cf2slmnbyrgln3vj6i2"; + sha256 = "1fxhppdmrysr2nb5z3c448h17np48f3ga9jih33acj78r4rdblcs"; }; - meta = { + useDune2 = true; + + meta = with lib; { description = "Parser and printer for the opam file syntax"; - license = lib.licenses.lgpl21; - maintainers = [ lib.maintainers.vbgl ]; - inherit (src.meta) homepage; + license = licenses.lgpl21; + maintainers = with maintainers; [ vbgl ]; + homepage = "https://github.com/ocaml/opam-file-format/"; }; } diff --git a/nixpkgs/pkgs/development/ocaml-modules/parmap/default.nix b/nixpkgs/pkgs/development/ocaml-modules/parmap/default.nix index 7adc8482b232..d79999087dd8 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/parmap/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/parmap/default.nix @@ -1,24 +1,28 @@ -{ lib, buildDunePackage, fetchurl, dune-configurator }: +{ lib, fetchurl, buildDunePackage, dune-configurator }: buildDunePackage rec { pname = "parmap"; - version = "1.2"; - - useDune2 = true; + version = "1.2.3"; src = fetchurl { url = "https://github.com/rdicosmo/${pname}/releases/download/${version}/${pname}-${version}.tbz"; - sha256 = "sha256-XUXptzD0eytaypaBQ+EBp4iVFRE6/Y0inS93t/YZrM8="; + sha256 = "1wg81slp453jci0gi0rzvdjx74110mlf1n5qpsmxic6fqsyz9d2v"; }; - buildInputs = [ dune-configurator ]; + minimalOCamlVersion = "4.03"; + useDune2 = true; + + buildInputs = [ + dune-configurator + ]; doCheck = true; meta = with lib; { description = "Library for multicore parallel programming"; + downloadPage = "https://github.com/rdicosmo/parmap"; homepage = "https://rdicosmo.github.io/parmap"; - maintainers = [ maintainers.bcdarwin ]; license = licenses.lgpl2; + maintainers = with maintainers; [ bcdarwin ]; }; } diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/cli.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/cli.nix new file mode 100644 index 000000000000..1a4c020dc352 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/cli.nix @@ -0,0 +1,11 @@ +{ re, reason, pastel, ... }: + +{ + pname = "cli"; + + buildInputs = [ + re + reason + pastel + ]; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/console.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/console.nix new file mode 100644 index 000000000000..c11c12b46730 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/console.nix @@ -0,0 +1,21 @@ +{ buildDunePackage, callPackage, reason, console, ... }: + +{ + pname = "console"; + + buildInputs = [ + reason + ]; + + passthru.tests = { + console = callPackage ./tests/console { + inherit buildDunePackage reason console; + }; + }; + + meta = { + description = "A library providing a web-influenced polymorphic console API for native Console.log(anything) with runtime printing"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/console"; + homepage = "https://reason-native.com/docs/console/"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/default.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/default.nix new file mode 100644 index 000000000000..f65aa5159b9d --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/default.nix @@ -0,0 +1,43 @@ +{ newScope, lib, fetchFromGitHub, callPackage, buildDunePackage, atdgen, junit, qcheck-core, re, reason, reason-native }: + +let + generic = (somePath: + let + prepkg = import somePath { + inherit callPackage cli buildDunePackage atdgen junit qcheck-core re reason; + inherit (reason-native) console file-context-printer fp pastel rely; + }; + in + buildDunePackage + ({ + version = "2021-16-16-aec0ac6"; + src = fetchFromGitHub { + owner = "reasonml"; + repo = "reason-native"; + rev = "aec0ac681be7211b4d092262281689c46deb63e1"; + sha256 = "sha256-QoyI50MBY3RJBmM1y90n7oXrLmHe0CQxKojv+7YbegE="; + }; + useDune2 = true; + meta = with lib; { + description = "Libraries for building and testing native Reason programs"; + downloadPage = "https://github.com/reasonml/reason-native"; + homepage = "https://reason-native.com/"; + license = licenses.mit; + maintainers = with maintainers; [ superherointj ]; + } // (prepkg.meta or {}); + } // prepkg) + ); + cli = generic ./cli.nix; # Used only by Rely. +in + lib.makeScope newScope (self: with self; { + console = generic ./console.nix; + dir = generic ./dir.nix; + file-context-printer = generic ./file-context-printer.nix; + fp = generic ./fp.nix; + pastel = generic ./pastel.nix; + pastel-console = generic ./pastel-console.nix; + qcheck-rely = generic ./qcheck-rely.nix; + refmterr = generic ./refmterr.nix; + rely = generic ./rely.nix; + rely-junit-reporter = generic ./rely-junit-reporter.nix; + }) diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/dir.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/dir.nix new file mode 100644 index 000000000000..e6eb9c0c403f --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/dir.nix @@ -0,0 +1,18 @@ +{ reason, fp, ... }: + +{ + pname = "dir"; + + buildInputs = [ + reason + ]; + + propagatedBuildInputs = [ + fp + ]; + + meta = { + description = "A library that provides a consistent API for common system, user and application directories consistently on all platforms"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/dir"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix new file mode 100644 index 000000000000..749e727feeca --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix @@ -0,0 +1,20 @@ +{ reason, re, pastel, ... }: + +{ + pname = "file-context-printer"; + + buildInputs = [ + reason + ]; + + propagatedBuildInputs = [ + re + pastel + ]; + + meta = { + description = "Utility for displaying snippets of files on the command line"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/file-context-printer"; + homepage = "https://reason-native.com/docs/file-context-printer/"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/fp.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/fp.nix new file mode 100644 index 000000000000..ae6ae50705d5 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/fp.nix @@ -0,0 +1,14 @@ +{ reason, ... }: + +{ + pname = "fp"; + + buildInputs = [ + reason + ]; + + meta = { + description = "A library for creating and operating on file paths consistently on multiple platforms"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/fp"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/pastel-console.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/pastel-console.nix new file mode 100644 index 000000000000..f1d2c7cc7264 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/pastel-console.nix @@ -0,0 +1,20 @@ +{ reason, console, pastel, ... }: + +{ + pname = "pastel-console"; + + buildInputs = [ + reason + ]; + + propagatedBuildInputs = [ + console + pastel + ]; + + meta = { + description = "Small library for pretty coloring to Console output"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/pastel-console"; + homepage = "https://reason-native.com/docs/pastel/console"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/pastel.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/pastel.nix new file mode 100644 index 000000000000..a5abc4e219c5 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/pastel.nix @@ -0,0 +1,20 @@ +{ reason, re, ... }: + +{ + pname = "pastel"; + + minimalOCamlVersion = "4.05"; + + buildInputs = [ + reason + ]; + propagatedBuildInputs = [ + re + ]; + + meta = { + description = "A text formatting library that harnesses Reason JSX to provide intuitive terminal output. Like React but for CLI"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/pastel"; + homepage = "https://reason-native.com/docs/pastel/"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix new file mode 100644 index 000000000000..a3d297b4f5a5 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix @@ -0,0 +1,20 @@ +{ qcheck-core, reason, console, rely, ... }: + +{ + pname = "qcheck-rely"; + + buildInputs = [ + reason + ]; + + propagatedBuildInputs = [ + qcheck-core + console + rely + ]; + + meta = { + description = "A library containing custom Rely matchers allowing for easily using QCheck with Rely. QCheck is a 'QuickCheck inspired property-based testing for OCaml, and combinators to generate random values to run tests on'"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/qcheck-rely"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/refmterr.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/refmterr.nix new file mode 100644 index 000000000000..9b14d4a8ba31 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/refmterr.nix @@ -0,0 +1,21 @@ +{ atdgen, re, reason, pastel, ... }: + +{ + pname = "refmterr"; + + buildInputs = [ + reason + ]; + + propagatedBuildInputs = [ + atdgen + re + pastel + ]; + + meta = { + description = "An error formatter tool for Reason and OCaml. Takes raw error output from compiler and converts to pretty output"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/refmterr"; + homepage = "https://reason-native.com/docs/refmterr/"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix new file mode 100644 index 000000000000..6e8b41bbd1c4 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix @@ -0,0 +1,23 @@ +{ atdgen, junit, re, reason, pastel, rely, ... }: + +{ + pname = "rely-junit-reporter"; + + buildInputs = [ + atdgen + reason + ]; + + propagatedBuildInputs = [ + junit + re + pastel + rely + ]; + + meta = { + description = "A tool providing JUnit Reporter for Rely Testing Framework"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/rely-junit-reporter"; + homepage = "https://reason-native.com/docs/rely/"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/rely.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/rely.nix new file mode 100644 index 000000000000..a2230426bec1 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/rely.nix @@ -0,0 +1,22 @@ +{ re, reason, cli, file-context-printer, pastel, ... }: + +{ + pname = "rely"; + + buildInputs = [ + reason + ]; + + propagatedBuildInputs = [ + re + cli + file-context-printer + pastel + ]; + + meta = { + description = "A Jest-inspired testing framework for native OCaml/Reason"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/rely"; + homepage = "https://reason-native.com/docs/rely/"; + }; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.opam b/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.opam new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.opam diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.re b/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.re new file mode 100644 index 000000000000..15685205e1bc --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.re @@ -0,0 +1 @@ +Console.log(Some("Hello fellow Nixer!")); /* {"Hello fellow Nixer!"} */ diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix b/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix new file mode 100644 index 000000000000..e1a995d33c5c --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, reason, console }: + +buildDunePackage rec { + pname = "console-test"; + version = "1"; + + src = ./.; + + useDune2 = true; + + buildInputs = [ + reason + console + ]; + + doInstallCheck = true; + postInstallCheck = '' + $out/bin/console-test | grep -q "{\"Hello fellow Nixer!\"}" > /dev/null + ''; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/dune b/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/dune new file mode 100644 index 000000000000..49f2121385e2 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/dune @@ -0,0 +1,4 @@ +(executable + (name console-test) + (public_name console-test) + (libraries reason console.lib)) diff --git a/nixpkgs/pkgs/development/ocaml-modules/sha/default.nix b/nixpkgs/pkgs/development/ocaml-modules/sha/default.nix index a506e6795fd1..80a5205a2301 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/sha/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/sha/default.nix @@ -1,28 +1,29 @@ -{ lib -, fetchurl -, buildDunePackage -, ounit -}: +{ lib, fetchurl, buildDunePackage, stdlib-shims, ounit }: buildDunePackage rec { pname = "sha"; - version = "1.13"; - - useDune2 = true; + version = "1.14"; src = fetchurl { url = "https://github.com/djs55/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; - sha256 = "00z2s4fsv9i1h09rj5dy3nd9hhcn79b75sn2ljj5wihlf4y4g304"; + sha256 = "114vydrfdp7fayigvgk3ckiby0kh4n49c1j53v8k40gk6nzm3l19"; }; + useDune2 = true; + + propagatedBuildInputs = [ + stdlib-shims + ]; + doCheck = true; - checkInputs = [ ounit ]; + checkInputs = [ + ounit + ]; meta = with lib; { description = "Binding for SHA interface code in OCaml"; - maintainers = [ maintainers.arthurteisseire ]; - homepage = "https://github.com/djs55/ocaml-${pname}"; + homepage = "https://github.com/djs55/ocaml-sha/"; license = licenses.isc; + maintainers = with maintainers; [ arthurteisseire ]; }; - } diff --git a/nixpkgs/pkgs/development/ocaml-modules/tls/async.nix b/nixpkgs/pkgs/development/ocaml-modules/tls/async.nix new file mode 100644 index 000000000000..ceac7a7c0749 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/tls/async.nix @@ -0,0 +1,21 @@ +{ lib, buildDunePackage, tls, async, cstruct-async, core, cstruct, mirage-crypto-rng-async }: + +buildDunePackage rec { + pname = "tls-async"; + + inherit (tls) src meta version; + + minimumOCamlVersion = "4.08"; + useDune2 = true; + + doCheck = true; + + propagatedBuildInputs = [ + async + core + cstruct + cstruct-async + mirage-crypto-rng-async + tls + ]; +} diff --git a/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix b/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix index dadeb5a98eaf..5a5479c9fe85 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix @@ -1,28 +1,47 @@ -{ lib, fetchurl, buildDunePackage, ppx_sexp_conv, ppx_cstruct, cstruct -, cstruct-sexp, sexplib, mirage-crypto, mirage-crypto-pk, mirage-crypto-rng -, x509, domain-name, fmt, cstruct-unix, ounit2, ocaml_lwt, ptime, rresult -, mirage-crypto-ec, hkdf, logs, alcotest }: +{ lib, fetchurl, buildDunePackage +, cstruct, cstruct-sexp, domain-name, fmt, ppx_cstruct, ppx_sexp_conv, logs, hkdf, mirage-crypto, mirage-crypto-ec, mirage-crypto-pk, mirage-crypto-rng, ocaml_lwt, ptime, rresult, sexplib, x509 +, alcotest, cstruct-unix, ounit2, randomconv +}: buildDunePackage rec { - minimumOCamlVersion = "4.08"; - - version = "0.13.1"; pname = "tls"; + version = "0.13.2"; src = fetchurl { url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-v${version}.tbz"; - sha256 = "ca95fa59a82f7d38b0b495fc0cd1ff54e7728492a292895d0067c1ba9de81b7b"; + sha256 = "sha256-IE6Fuvem8A3lZ/M8GLNYNwCG+v7BbPQ4QdYS+fKT50c="; }; + minimumOCamlVersion = "4.08"; useDune2 = true; - doCheck = true; - checkInputs = [ cstruct-unix ounit2 alcotest ]; + propagatedBuildInputs = [ + cstruct + cstruct-sexp + domain-name + fmt + ppx_cstruct + ppx_sexp_conv + logs + hkdf + mirage-crypto + mirage-crypto-ec + mirage-crypto-pk + mirage-crypto-rng + ocaml_lwt + ptime + rresult + sexplib + x509 + ]; - propagatedBuildInputs = [ ppx_sexp_conv ppx_cstruct cstruct cstruct-sexp - sexplib mirage-crypto mirage-crypto-pk mirage-crypto-rng - x509 domain-name fmt ocaml_lwt ptime mirage-crypto-ec - hkdf logs rresult ]; + doCheck = true; + checkInputs = [ + alcotest + cstruct-unix + ounit2 + randomconv + ]; meta = with lib; { homepage = "https://github.com/mirleft/ocaml-tls"; diff --git a/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix b/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix index 18d0f08357d4..a0428536b813 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix @@ -1,25 +1,23 @@ { buildDunePackage, tls -, x509, lwt, fmt, mirage-flow, mirage-kv, mirage-clock, ptime -, mirage-crypto, mirage-crypto-pk, mirage-crypto-ec +, fmt, lwt, mirage-clock, mirage-crypto, mirage-crypto-ec, mirage-crypto-pk, mirage-flow, mirage-kv, ptime, x509 }: buildDunePackage { pname = "tls-mirage"; - - inherit (tls) version src useDune2 minimumOCamlVersion; + inherit (tls) src version minimumOCamlVersion useDune2; propagatedBuildInputs = [ - tls - x509 - lwt fmt - mirage-flow - mirage-kv + lwt mirage-clock - ptime mirage-crypto - mirage-crypto-pk mirage-crypto-ec + mirage-crypto-pk + mirage-flow + mirage-kv + ptime + tls + x509 ]; meta = tls.meta // { |