lol

ocamlPackages.reason-native: init 2020-07-18-a33f152

Adds 10 Reason Native packages:
* reason-native-console
* reason-native-dir
* reason-native-file-context-printer
* reason-native-fp
* reason-native-pastel
* reason-native-pastel-console
* reason-native-qcheck-rely
* reason-native-refmterr
* reason-native-rely
* reason-native-rely-junit-reporter

authored by

superherointj and committed by
Vincent Laporte
2efd63b8 f68a2093

+280
+11
pkgs/development/ocaml-modules/reason-native/cli.nix
··· 1 + { re, reason, pastel, ... }: 2 + 3 + { 4 + pname = "cli"; 5 + 6 + buildInputs = [ 7 + re 8 + reason 9 + pastel 10 + ]; 11 + }
+21
pkgs/development/ocaml-modules/reason-native/console.nix
··· 1 + { buildDunePackage, callPackage, reason, console, ... }: 2 + 3 + { 4 + pname = "console"; 5 + 6 + buildInputs = [ 7 + reason 8 + ]; 9 + 10 + passthru.tests = { 11 + console = callPackage ./tests/console { 12 + inherit buildDunePackage reason console; 13 + }; 14 + }; 15 + 16 + meta = { 17 + description = "A library providing a web-influenced polymorphic console API for native Console.log(anything) with runtime printing"; 18 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/console"; 19 + homepage = "https://reason-native.com/docs/console/"; 20 + }; 21 + }
+43
pkgs/development/ocaml-modules/reason-native/default.nix
··· 1 + { newScope, lib, fetchFromGitHub, callPackage, buildDunePackage, atdgen, junit, qcheck-core, re, reason, reason-native }: 2 + 3 + let 4 + generic = (somePath: 5 + let 6 + prepkg = import somePath { 7 + inherit callPackage cli buildDunePackage atdgen junit qcheck-core re reason; 8 + inherit (reason-native) console file-context-printer fp pastel rely; 9 + }; 10 + in 11 + buildDunePackage 12 + ({ 13 + version = "2021-16-16-aec0ac6"; 14 + src = fetchFromGitHub { 15 + owner = "reasonml"; 16 + repo = "reason-native"; 17 + rev = "aec0ac681be7211b4d092262281689c46deb63e1"; 18 + sha256 = "sha256-QoyI50MBY3RJBmM1y90n7oXrLmHe0CQxKojv+7YbegE="; 19 + }; 20 + useDune2 = true; 21 + meta = with lib; { 22 + description = "Libraries for building and testing native Reason programs"; 23 + downloadPage = "https://github.com/reasonml/reason-native"; 24 + homepage = "https://reason-native.com/"; 25 + license = licenses.mit; 26 + maintainers = with maintainers; [ superherointj ]; 27 + } // (prepkg.meta or {}); 28 + } // prepkg) 29 + ); 30 + cli = generic ./cli.nix; # Used only by Rely. 31 + in 32 + lib.makeScope newScope (self: with self; { 33 + console = generic ./console.nix; 34 + dir = generic ./dir.nix; 35 + file-context-printer = generic ./file-context-printer.nix; 36 + fp = generic ./fp.nix; 37 + pastel = generic ./pastel.nix; 38 + pastel-console = generic ./pastel-console.nix; 39 + qcheck-rely = generic ./qcheck-rely.nix; 40 + refmterr = generic ./refmterr.nix; 41 + rely = generic ./rely.nix; 42 + rely-junit-reporter = generic ./rely-junit-reporter.nix; 43 + })
+18
pkgs/development/ocaml-modules/reason-native/dir.nix
··· 1 + { reason, fp, ... }: 2 + 3 + { 4 + pname = "dir"; 5 + 6 + buildInputs = [ 7 + reason 8 + ]; 9 + 10 + propagatedBuildInputs = [ 11 + fp 12 + ]; 13 + 14 + meta = { 15 + description = "A library that provides a consistent API for common system, user and application directories consistently on all platforms"; 16 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/dir"; 17 + }; 18 + }
+20
pkgs/development/ocaml-modules/reason-native/file-context-printer.nix
··· 1 + { reason, re, pastel, ... }: 2 + 3 + { 4 + pname = "file-context-printer"; 5 + 6 + buildInputs = [ 7 + reason 8 + ]; 9 + 10 + propagatedBuildInputs = [ 11 + re 12 + pastel 13 + ]; 14 + 15 + meta = { 16 + description = "Utility for displaying snippets of files on the command line"; 17 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/file-context-printer"; 18 + homepage = "https://reason-native.com/docs/file-context-printer/"; 19 + }; 20 + }
+14
pkgs/development/ocaml-modules/reason-native/fp.nix
··· 1 + { reason, ... }: 2 + 3 + { 4 + pname = "fp"; 5 + 6 + buildInputs = [ 7 + reason 8 + ]; 9 + 10 + meta = { 11 + description = "A library for creating and operating on file paths consistently on multiple platforms"; 12 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/fp"; 13 + }; 14 + }
+20
pkgs/development/ocaml-modules/reason-native/pastel-console.nix
··· 1 + { reason, console, pastel, ... }: 2 + 3 + { 4 + pname = "pastel-console"; 5 + 6 + buildInputs = [ 7 + reason 8 + ]; 9 + 10 + propagatedBuildInputs = [ 11 + console 12 + pastel 13 + ]; 14 + 15 + meta = { 16 + description = "Small library for pretty coloring to Console output"; 17 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/pastel-console"; 18 + homepage = "https://reason-native.com/docs/pastel/console"; 19 + }; 20 + }
+20
pkgs/development/ocaml-modules/reason-native/pastel.nix
··· 1 + { reason, re, ... }: 2 + 3 + { 4 + pname = "pastel"; 5 + 6 + minimalOCamlVersion = "4.05"; 7 + 8 + buildInputs = [ 9 + reason 10 + ]; 11 + propagatedBuildInputs = [ 12 + re 13 + ]; 14 + 15 + meta = { 16 + description = "A text formatting library that harnesses Reason JSX to provide intuitive terminal output. Like React but for CLI"; 17 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/pastel"; 18 + homepage = "https://reason-native.com/docs/pastel/"; 19 + }; 20 + }
+20
pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix
··· 1 + { qcheck-core, reason, console, rely, ... }: 2 + 3 + { 4 + pname = "qcheck-rely"; 5 + 6 + buildInputs = [ 7 + reason 8 + ]; 9 + 10 + propagatedBuildInputs = [ 11 + qcheck-core 12 + console 13 + rely 14 + ]; 15 + 16 + meta = { 17 + 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'"; 18 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/qcheck-rely"; 19 + }; 20 + }
+21
pkgs/development/ocaml-modules/reason-native/refmterr.nix
··· 1 + { atdgen, re, reason, pastel, ... }: 2 + 3 + { 4 + pname = "refmterr"; 5 + 6 + buildInputs = [ 7 + reason 8 + ]; 9 + 10 + propagatedBuildInputs = [ 11 + atdgen 12 + re 13 + pastel 14 + ]; 15 + 16 + meta = { 17 + description = "An error formatter tool for Reason and OCaml. Takes raw error output from compiler and converts to pretty output"; 18 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/refmterr"; 19 + homepage = "https://reason-native.com/docs/refmterr/"; 20 + }; 21 + }
+23
pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix
··· 1 + { atdgen, junit, re, reason, pastel, rely, ... }: 2 + 3 + { 4 + pname = "rely-junit-reporter"; 5 + 6 + buildInputs = [ 7 + atdgen 8 + reason 9 + ]; 10 + 11 + propagatedBuildInputs = [ 12 + junit 13 + re 14 + pastel 15 + rely 16 + ]; 17 + 18 + meta = { 19 + description = "A tool providing JUnit Reporter for Rely Testing Framework"; 20 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/rely-junit-reporter"; 21 + homepage = "https://reason-native.com/docs/rely/"; 22 + }; 23 + }
+22
pkgs/development/ocaml-modules/reason-native/rely.nix
··· 1 + { re, reason, cli, file-context-printer, pastel, ... }: 2 + 3 + { 4 + pname = "rely"; 5 + 6 + buildInputs = [ 7 + reason 8 + ]; 9 + 10 + propagatedBuildInputs = [ 11 + re 12 + cli 13 + file-context-printer 14 + pastel 15 + ]; 16 + 17 + meta = { 18 + description = "A Jest-inspired testing framework for native OCaml/Reason"; 19 + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/rely"; 20 + homepage = "https://reason-native.com/docs/rely/"; 21 + }; 22 + }
pkgs/development/ocaml-modules/reason-native/tests/console/console-test.opam

This is a binary file and will not be displayed.

+1
pkgs/development/ocaml-modules/reason-native/tests/console/console-test.re
··· 1 + Console.log(Some("Hello fellow Nixer!")); /* {"Hello fellow Nixer!"} */
+20
pkgs/development/ocaml-modules/reason-native/tests/console/default.nix
··· 1 + { lib, buildDunePackage, reason, console }: 2 + 3 + buildDunePackage rec { 4 + pname = "console-test"; 5 + version = "1"; 6 + 7 + src = ./.; 8 + 9 + useDune2 = true; 10 + 11 + buildInputs = [ 12 + reason 13 + console 14 + ]; 15 + 16 + doInstallCheck = true; 17 + postInstallCheck = '' 18 + $out/bin/console-test | grep -q "{\"Hello fellow Nixer!\"}" > /dev/null 19 + ''; 20 + }
+4
pkgs/development/ocaml-modules/reason-native/tests/console/dune
··· 1 + (executable 2 + (name console-test) 3 + (public_name console-test) 4 + (libraries reason console.lib))
+2
pkgs/top-level/ocaml-packages.nix
··· 1144 1144 1145 1145 reason = callPackage ../development/compilers/reason { }; 1146 1146 1147 + reason-native = lib.recurseIntoAttrs (callPackage ../development/ocaml-modules/reason-native { }); 1148 + 1147 1149 rope = callPackage ../development/ocaml-modules/rope { }; 1148 1150 1149 1151 rpclib = callPackage ../development/ocaml-modules/rpclib { };