diff --git a/pkgs/development/ocaml-modules/reason-native/cli.nix b/pkgs/development/ocaml-modules/reason-native/cli.nix index ee5e7d2774d2..c6c5abfb7f9a 100644 --- a/pkgs/development/ocaml-modules/reason-native/cli.nix +++ b/pkgs/development/ocaml-modules/reason-native/cli.nix @@ -1,7 +1,10 @@ -{ re, reason, pastel, ... }: +{ lib, buildDunePackage, re, reason, pastel, src }: + +buildDunePackage { + inherit src; -{ pname = "cli"; + version = "0.0.1-alpha-unstable-2024-05-07"; nativeBuildInputs = [ reason @@ -11,4 +14,11 @@ re pastel ]; + + meta = { + downloadPage = "https://github.com/reasonml/reason-native"; + homepage = "https://reason-native.com/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; } diff --git a/pkgs/development/ocaml-modules/reason-native/console.nix b/pkgs/development/ocaml-modules/reason-native/console.nix index a39ba9a7e3ec..38d95a0c0f39 100644 --- a/pkgs/development/ocaml-modules/reason-native/console.nix +++ b/pkgs/development/ocaml-modules/reason-native/console.nix @@ -1,21 +1,24 @@ -{ buildDunePackage, callPackage, reason, console, ... }: +{ lib, buildDunePackage, callPackage, reason, console, src }: + +buildDunePackage { + inherit src; -{ pname = "console"; + version = "0.1.0-unstable-2024-05-07"; nativeBuildInputs = [ reason ]; passthru.tests = { - console = callPackage ./tests/console { - inherit buildDunePackage reason console; - }; + console = callPackage ./tests/console { }; }; meta = { description = "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/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/default.nix b/pkgs/development/ocaml-modules/reason-native/default.nix index 024783cf6184..b44e63080e5c 100644 --- a/pkgs/development/ocaml-modules/reason-native/default.nix +++ b/pkgs/development/ocaml-modules/reason-native/default.nix @@ -1,43 +1,47 @@ -{ newScope, lib, fetchFromGitHub, callPackage, buildDunePackage, atdgen, junit, qcheck-core, re, reason, reason-native, fetchpatch }: +{ + lib, + newScope, + fetchFromGitHub, + atdgen, + buildDunePackage, + junit, + ppxlib, + qcheck-core, + re, + reason, +}: -let - generic = (somePath: - let - prepkg = import somePath { - inherit callPackage cli buildDunePackage atdgen junit qcheck-core re reason fetchpatch; - inherit (reason-native) console file-context-printer fp pastel rely; - }; - in - buildDunePackage - ({ - version = "2022-08-31-a0ddab6"; - src = fetchFromGitHub { - owner = "reasonml"; - repo = "reason-native"; - rev = "a0ddab6ab25237961e32d8732b0a222ec2372d4a"; - hash = "sha256-s2N5OFTwIbKXcv05gQRaBMCHO1Mj563yhryPeo8jMh8="; - }; - duneVersion = "3"; - 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; [ ]; - } // (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; - }) +lib.makeScope newScope (self: { + inherit lib buildDunePackage re reason ppxlib; + + # Upstream doesn't use tags, releases, or branches. + src = fetchFromGitHub { + owner = "reasonml"; + repo = "reason-native"; + rev = "20b1997b6451d9715dfdbeec86a9d274c7430ed8"; + hash = "sha256-96Ucq70eSy6pqh5ne9xoODWe/nPuriZnFAdx0OkLVCs="; + }; + + cli = self.callPackage ./cli.nix { }; + console = self.callPackage ./console.nix { }; + dir = self.callPackage ./dir.nix { }; + file-context-printer = self.callPackage ./file-context-printer.nix { }; + frame = self.callPackage ./frame.nix { }; + fp = self.callPackage ./fp.nix { }; + fs = self.callPackage ./fs.nix { }; + pastel = self.callPackage ./pastel.nix { }; + pastel-console = self.callPackage ./pastel-console.nix { }; + qcheck-rely = self.callPackage ./qcheck-rely.nix { + inherit qcheck-core; + }; + refmterr = self.callPackage ./refmterr.nix { + inherit atdgen; + }; + rely = self.callPackage ./rely.nix { }; + rely-junit-reporter = self.callPackage ./rely-junit-reporter.nix { + inherit atdgen junit; + }; + unicode-config = self.callPackage ./unicode-config.nix { }; + unicode = self.callPackage ./unicode.nix { }; + utf8 = self.callPackage ./utf8.nix { }; +}) diff --git a/pkgs/development/ocaml-modules/reason-native/dir.nix b/pkgs/development/ocaml-modules/reason-native/dir.nix index 8b09eafc3696..6cd04ece01f6 100644 --- a/pkgs/development/ocaml-modules/reason-native/dir.nix +++ b/pkgs/development/ocaml-modules/reason-native/dir.nix @@ -1,7 +1,10 @@ -{ reason, fp, ... }: +{ lib, buildDunePackage, reason, fp, src }: + +buildDunePackage { + inherit src; -{ pname = "dir"; + version = "0.0.1-unstable-2024-05-07"; nativeBuildInputs = [ reason @@ -14,5 +17,7 @@ meta = { description = "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"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix b/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix index a7c663493ef5..462b667921c1 100644 --- a/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix +++ b/pkgs/development/ocaml-modules/reason-native/file-context-printer.nix @@ -1,7 +1,10 @@ -{ reason, re, pastel, ... }: +{ lib, buildDunePackage, reason, re, pastel, src }: + +buildDunePackage { + inherit src; -{ pname = "file-context-printer"; + version = "0.0.3-unstable-2024-05-07"; nativeBuildInputs = [ reason @@ -16,5 +19,7 @@ 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/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/fp.nix b/pkgs/development/ocaml-modules/reason-native/fp.nix index 7df1c84e55cf..35a099771dc6 100644 --- a/pkgs/development/ocaml-modules/reason-native/fp.nix +++ b/pkgs/development/ocaml-modules/reason-native/fp.nix @@ -1,7 +1,10 @@ -{ reason, ... }: +{ lib, buildDunePackage, reason, src }: + +buildDunePackage { + inherit src; -{ pname = "fp"; + version = "0.0.1-unstable-2024-05-07"; nativeBuildInputs = [ reason @@ -10,5 +13,7 @@ meta = { description = "Library for creating and operating on file paths consistently on multiple platforms"; downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/fp"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/frame.nix b/pkgs/development/ocaml-modules/reason-native/frame.nix new file mode 100644 index 000000000000..dc845db55249 --- /dev/null +++ b/pkgs/development/ocaml-modules/reason-native/frame.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, reason, re, pastel, src }: + +buildDunePackage { + inherit src; + + pname = "frame"; + version = "0.0.1-unstable-2024-05-07"; + + nativeBuildInputs = [ + reason + ]; + + propagatedBuildInputs = [ + pastel + re + ]; + + meta = { + description = "Reason Native text layout library"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/frame"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/ocaml-modules/reason-native/fs.nix b/pkgs/development/ocaml-modules/reason-native/fs.nix new file mode 100644 index 000000000000..c553f6a6ad98 --- /dev/null +++ b/pkgs/development/ocaml-modules/reason-native/fs.nix @@ -0,0 +1,24 @@ +{ lib, buildDunePackage, fp, reason, src }: + +buildDunePackage { + inherit src; + + pname = "fs"; + version = "0.0.2-unstable-2024-05-07"; + + nativeBuildInputs = [ + reason + ]; + + propagatedBuildInputs = [ + fp + ]; + + meta = { + description = "Reason Native file system API"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/fs"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} + diff --git a/pkgs/development/ocaml-modules/reason-native/pastel-console.nix b/pkgs/development/ocaml-modules/reason-native/pastel-console.nix index 968b9f88af91..1a424fad5401 100644 --- a/pkgs/development/ocaml-modules/reason-native/pastel-console.nix +++ b/pkgs/development/ocaml-modules/reason-native/pastel-console.nix @@ -1,7 +1,10 @@ -{ reason, console, pastel, ... }: +{ lib, buildDunePackage, reason, console, pastel, src }: + +buildDunePackage { + inherit src; -{ pname = "pastel-console"; + version = "0.0.0-unstable-2024-05-07"; nativeBuildInputs = [ reason @@ -16,5 +19,7 @@ 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"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/pastel.nix b/pkgs/development/ocaml-modules/reason-native/pastel.nix index 6d08243638ca..d8a4d7e0f9ca 100644 --- a/pkgs/development/ocaml-modules/reason-native/pastel.nix +++ b/pkgs/development/ocaml-modules/reason-native/pastel.nix @@ -1,13 +1,17 @@ -{ reason, re, ... }: +{ lib, buildDunePackage, reason, re, src }: + +buildDunePackage { + inherit src; -{ pname = "pastel"; + version = "0.3.0-unstable-2024-05-07"; minimalOCamlVersion = "4.05"; nativeBuildInputs = [ reason ]; + propagatedBuildInputs = [ re ]; @@ -16,5 +20,7 @@ description = "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/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix b/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix index ac645791f46c..4006df5d90c8 100644 --- a/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix +++ b/pkgs/development/ocaml-modules/reason-native/qcheck-rely.nix @@ -1,23 +1,15 @@ -{ qcheck-core, reason, console, rely, fetchpatch, ... }: +{ lib, buildDunePackage, qcheck-core, reason, console, rely, src }: + +buildDunePackage { + inherit src; -{ pname = "qcheck-rely"; + version = "1.0.2-unstable-2024-05-07"; nativeBuildInputs = [ reason ]; - patches = [ - (fetchpatch { - url = "https://github.com/reasonml/reason-native/pull/269/commits/b42d66f5929a11739c13f849939007bf8610888b.patch"; - hash = "sha256-MMLl3eqF8xQZ2T+sIEuv2WpnGF6FZtatgH5fiF5hpP4="; - includes = [ - "src/qcheck-rely/QCheckRely.re" - "src/qcheck-rely/QCheckRely.rei" - ]; - }) - ]; - propagatedBuildInputs = [ qcheck-core console @@ -27,5 +19,7 @@ meta = { description = "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"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/refmterr.nix b/pkgs/development/ocaml-modules/reason-native/refmterr.nix index 17c595d9e107..3f320fd2364d 100644 --- a/pkgs/development/ocaml-modules/reason-native/refmterr.nix +++ b/pkgs/development/ocaml-modules/reason-native/refmterr.nix @@ -1,7 +1,10 @@ -{ atdgen, re, reason, pastel, ... }: +{ lib, buildDunePackage, atdgen, re, reason, pastel, src }: + +buildDunePackage { + inherit src; -{ pname = "refmterr"; + version = "3.3.0-unstable-2024-05-07"; nativeBuildInputs = [ atdgen @@ -18,5 +21,7 @@ description = "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/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix b/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix index 25d9cc2c5f70..46097c45ebdf 100644 --- a/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix +++ b/pkgs/development/ocaml-modules/reason-native/rely-junit-reporter.nix @@ -1,7 +1,10 @@ -{ atdgen, junit, re, reason, pastel, rely, ... }: +{ lib, buildDunePackage, atdgen, junit, re, reason, pastel, rely, src }: + +buildDunePackage { + inherit src; -{ pname = "rely-junit-reporter"; + version = "1.0.0-unstable-2024-05-07"; nativeBuildInputs = [ reason @@ -22,5 +25,7 @@ description = "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/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/rely.nix b/pkgs/development/ocaml-modules/reason-native/rely.nix index 40315a668ba9..e3ca4b9ad5e9 100644 --- a/pkgs/development/ocaml-modules/reason-native/rely.nix +++ b/pkgs/development/ocaml-modules/reason-native/rely.nix @@ -1,7 +1,10 @@ -{ re, reason, cli, file-context-printer, pastel, ... }: +{ lib, buildDunePackage, re, reason, cli, file-context-printer, pastel, src }: + +buildDunePackage { + inherit src; -{ pname = "rely"; + version = "4.0.0-unstable-2024-05-07"; nativeBuildInputs = [ reason @@ -18,5 +21,7 @@ description = "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/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.opam b/pkgs/development/ocaml-modules/reason-native/tests/console/console_test.opam similarity index 100% rename from pkgs/development/ocaml-modules/reason-native/tests/console/console-test.opam rename to pkgs/development/ocaml-modules/reason-native/tests/console/console_test.opam diff --git a/pkgs/development/ocaml-modules/reason-native/tests/console/console-test.re b/pkgs/development/ocaml-modules/reason-native/tests/console/console_test.re similarity index 100% rename from pkgs/development/ocaml-modules/reason-native/tests/console/console-test.re rename to pkgs/development/ocaml-modules/reason-native/tests/console/console_test.re diff --git a/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix b/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix index fc7f1891339b..b2bc31565f04 100644 --- a/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix +++ b/pkgs/development/ocaml-modules/reason-native/tests/console/default.nix @@ -1,20 +1,34 @@ -{ lib, buildDunePackage, reason, console }: +{ lib, buildDunePackage, reason, console, ppxlib }: -buildDunePackage rec { - pname = "console-test"; +buildDunePackage { + pname = "console_test"; version = "1"; - src = ./.; + src = lib.fileset.toSource { + root = ./.; + fileset = lib.fileset.unions [ + ./console_test.opam + ./console_test.re + ./dune + ./dune-project + ]; + }; duneVersion = "3"; + nativeBuildInputs = [ + reason + ]; + buildInputs = [ reason console + ppxlib ]; doInstallCheck = true; + postInstallCheck = '' - $out/bin/console-test | grep -q "{\"Hello fellow Nixer!\"}" > /dev/null + $out/bin/console_test | grep -q "{\"Hello fellow Nixer!\"}" > /dev/null ''; } diff --git a/pkgs/development/ocaml-modules/reason-native/tests/console/dune b/pkgs/development/ocaml-modules/reason-native/tests/console/dune index 49f2121385e2..3bf2eefb27db 100644 --- a/pkgs/development/ocaml-modules/reason-native/tests/console/dune +++ b/pkgs/development/ocaml-modules/reason-native/tests/console/dune @@ -1,4 +1,4 @@ (executable - (name console-test) - (public_name console-test) + (name console_test) + (public_name console_test) (libraries reason console.lib)) diff --git a/pkgs/development/ocaml-modules/reason-native/tests/console/dune-project b/pkgs/development/ocaml-modules/reason-native/tests/console/dune-project new file mode 100644 index 000000000000..a26d6e273960 --- /dev/null +++ b/pkgs/development/ocaml-modules/reason-native/tests/console/dune-project @@ -0,0 +1 @@ +(lang dune 1.6) diff --git a/pkgs/development/ocaml-modules/reason-native/unicode-config.nix b/pkgs/development/ocaml-modules/reason-native/unicode-config.nix new file mode 100644 index 000000000000..1b80ae2a71fd --- /dev/null +++ b/pkgs/development/ocaml-modules/reason-native/unicode-config.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, reason, src }: + +buildDunePackage { + inherit src; + + pname = "unicode-config"; + version = "0.0.0-unstable-2024-05-07"; + + nativeBuildInputs = [ + reason + ]; + + meta = { + description = "Configuration used to generate the @reason-native/unicode library"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/unicode-config"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/ocaml-modules/reason-native/unicode.nix b/pkgs/development/ocaml-modules/reason-native/unicode.nix new file mode 100644 index 000000000000..544367424d0b --- /dev/null +++ b/pkgs/development/ocaml-modules/reason-native/unicode.nix @@ -0,0 +1,19 @@ +{ lib, buildDunePackage, reason, src }: + +buildDunePackage { + inherit src; + + pname = "unicode"; + version = "0.0.0-unstable-2024-05-07"; + + nativeBuildInputs = [ + reason + ]; + + meta = { + description = "Easy to use and well documented Unicode symbols"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/unicode"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/ocaml-modules/reason-native/utf8.nix b/pkgs/development/ocaml-modules/reason-native/utf8.nix new file mode 100644 index 000000000000..40c874b5b41f --- /dev/null +++ b/pkgs/development/ocaml-modules/reason-native/utf8.nix @@ -0,0 +1,20 @@ +{ lib, buildDunePackage, reason, src }: + +buildDunePackage { + inherit src; + + pname = "utf8"; + version = "0.1.0-unstable-2024-05-07"; + + nativeBuildInputs = [ + reason + ]; + + meta = { + description = "Utf8 logic with minimal dependencies"; + downloadPage = "https://github.com/reasonml/reason-native/tree/master/src/utf8"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} +