diff --git a/pkgs/development/ocaml-modules/lwd/default.nix b/pkgs/development/ocaml-modules/lwd/default.nix new file mode 100644 index 000000000000..43e13bbcc893 --- /dev/null +++ b/pkgs/development/ocaml-modules/lwd/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchurl, buildDunePackage, seq }: + +buildDunePackage rec { + pname = "lwd"; + version = "0.3"; + + minimalOCamlVersion = "4.08"; + duneVersion = "3"; + + src = fetchurl { + url = + "https://github.com/let-def/lwd/releases/download/v${version}/lwd-${version}.tbz"; + sha256 = "sha256-H/vyW2tn2OBuWwcmPs8NcINXgFe93MSxRd8dzeoXARI="; + }; + + propagatedBuildInputs = [ seq ]; + + meta = with lib; { + description = "Lightweight reactive documents"; + license = licenses.mit; + maintainers = [ maintainers.alizter ]; + homepage = "https://github.com/let-def/lwd"; + }; +} diff --git a/pkgs/development/ocaml-modules/lwd/nottui-lwt.nix b/pkgs/development/ocaml-modules/lwd/nottui-lwt.nix new file mode 100644 index 000000000000..84df8db4ea37 --- /dev/null +++ b/pkgs/development/ocaml-modules/lwd/nottui-lwt.nix @@ -0,0 +1,19 @@ +{ lib, fetchurl, buildDunePackage, lwd, lwt, nottui }: + +buildDunePackage { + pname = "nottui-lwt"; + + inherit (lwd) version src; + + minimalOCamlVersion = "4.08"; + duneVersion = "3"; + + propagatedBuildInputs = [ lwt nottui ]; + + meta = with lib; { + description = "Run Nottui UIs in Lwt"; + license = licenses.mit; + maintainers = [ maintainers.alizter ]; + homepage = "https://github.com/let-def/lwd"; + }; +} diff --git a/pkgs/development/ocaml-modules/lwd/nottui-pretty.nix b/pkgs/development/ocaml-modules/lwd/nottui-pretty.nix new file mode 100644 index 000000000000..e411255c58c4 --- /dev/null +++ b/pkgs/development/ocaml-modules/lwd/nottui-pretty.nix @@ -0,0 +1,19 @@ +{ lib, fetchurl, buildDunePackage, lwd, nottui }: + +buildDunePackage { + pname = "nottui-pretty"; + + inherit (lwd) version src; + + minimalOCamlVersion = "4.08"; + duneVersion = "3"; + + propagatedBuildInputs = [ nottui ]; + + meta = with lib; { + description = "A pretty-printer based on PPrint rendering UIs"; + license = licenses.mit; + maintainers = [ maintainers.alizter ]; + homepage = "https://github.com/let-def/lwd"; + }; +} diff --git a/pkgs/development/ocaml-modules/lwd/nottui.nix b/pkgs/development/ocaml-modules/lwd/nottui.nix new file mode 100644 index 000000000000..6427ca9630c4 --- /dev/null +++ b/pkgs/development/ocaml-modules/lwd/nottui.nix @@ -0,0 +1,19 @@ +{ lib, fetchurl, buildDunePackage, lwd, notty }: + +buildDunePackage { + pname = "nottui"; + + inherit (lwd) version src; + + minimalOCamlVersion = "4.08"; + duneVersion = "3"; + + propagatedBuildInputs = [ lwd notty ]; + + meta = with lib; { + description = "UI toolkit for the terminal built on top of Notty and Lwd"; + license = licenses.mit; + maintainers = [ maintainers.alizter ]; + homepage = "https://github.com/let-def/lwd"; + }; +} diff --git a/pkgs/development/ocaml-modules/lwd/tyxml-lwd.nix b/pkgs/development/ocaml-modules/lwd/tyxml-lwd.nix new file mode 100644 index 000000000000..0832847be3d6 --- /dev/null +++ b/pkgs/development/ocaml-modules/lwd/tyxml-lwd.nix @@ -0,0 +1,20 @@ +{ lib, fetchurl, buildDunePackage, js_of_ocaml, js_of_ocaml-ppx, lwd, tyxml }: + +buildDunePackage { + pname = "tyxml-lwd"; + + inherit (lwd) version src; + + minimalOCamlVersion = "4.08"; + duneVersion = "3"; + + buildInputs = [ js_of_ocaml-ppx ]; + propagatedBuildInputs = [ js_of_ocaml lwd tyxml ]; + + meta = with lib; { + description = "Make reactive webpages in Js_of_ocaml using Tyxml and Lwd"; + license = licenses.mit; + maintainers = [ maintainers.alizter ]; + homepage = "https://github.com/let-def/lwd"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 4015e0013201..28e3db6d64c9 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -787,6 +787,8 @@ let inherit (pkgs) file; }; + lwd = callPackage ../development/ocaml-modules/lwd { }; + lwt = callPackage ../development/ocaml-modules/lwt { }; lwt-canceler = callPackage ../development/ocaml-modules/lwt-canceler { }; @@ -984,6 +986,12 @@ let note = callPackage ../development/ocaml-modules/note { }; + nottui = callPackage ../development/ocaml-modules/lwd/nottui.nix { }; + + nottui-lwt = callPackage ../development/ocaml-modules/lwd/nottui-lwt.nix { }; + + nottui-pretty = callPackage ../development/ocaml-modules/lwd/nottui-pretty.nix { }; + notty = callPackage ../development/ocaml-modules/notty { }; npy = callPackage ../development/ocaml-modules/npy { @@ -1296,6 +1304,8 @@ let tyxml = callPackage ../development/ocaml-modules/tyxml { }; + tyxml-lwd = callPackage ../development/ocaml-modules/lwd/tyxml-lwd.nix { }; + ulex = callPackage ../development/ocaml-modules/ulex { }; tls = callPackage ../development/ocaml-modules/tls { };