about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/reason-native
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/reason-native')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/cli.nix11
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/console.nix21
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/default.nix43
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/dir.nix18
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix20
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/fp.nix14
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/pastel-console.nix20
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/pastel.nix20
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix20
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/refmterr.nix21
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix23
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/rely.nix22
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.opam0
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.re1
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix20
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/reason-native/tests/console/dune4
16 files changed, 278 insertions, 0 deletions
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))