From 043cf6cd410c43ebbdbdc362bf17076c0582b5ba Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 4 May 2026 22:45:53 +0200 Subject: [PATCH 1/3] ocamlPackages.notty-community: init at 0.2.4 --- .../ocaml-modules/notty-community/default.nix | 34 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/ocaml-modules/notty-community/default.nix diff --git a/pkgs/development/ocaml-modules/notty-community/default.nix b/pkgs/development/ocaml-modules/notty-community/default.nix new file mode 100644 index 000000000000..a26084b0c634 --- /dev/null +++ b/pkgs/development/ocaml-modules/notty-community/default.nix @@ -0,0 +1,34 @@ +{ + lib, + fetchurl, + buildDunePackage, + cppo, + uutf, + lwt, +}: + +buildDunePackage (finalAttrs: { + pname = "notty-community"; + version = "0.2.4"; + + src = fetchurl { + url = "https://github.com/ocaml-community/notty-community/releases/download/v${finalAttrs.version}/notty-community-${finalAttrs.version}.tar.gz"; + hash = "sha256-FrA3wGX4lQZtrwXked1K/8LLvXel8xYIZ57gEmxX/d8="; + }; + + nativeBuildInputs = [ cppo ]; + + propagatedBuildInputs = [ + lwt + uutf + ]; + + doCheck = true; + + meta = { + description = "A declarative terminal library for OCaml"; + homepage = "https://github.com/ocaml-community/notty-community"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +}) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 4c129821501e..343f0b74899b 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1444,6 +1444,8 @@ let notty = callPackage ../development/ocaml-modules/notty { }; + notty-community = callPackage ../development/ocaml-modules/notty-community { }; + npy = callPackage ../development/ocaml-modules/npy { inherit (pkgs.python3Packages) numpy; }; From 8a6ddfefa3350ca7a8233ebf7f1809b0245946d2 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 4 May 2026 22:46:00 +0200 Subject: [PATCH 2/3] =?UTF-8?q?ocamlPackages.lwd:=200.4=20=E2=86=92=200.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/do/docfd/package.nix | 13 +++++++++++-- pkgs/development/ocaml-modules/lwd/default.nix | 12 +++++------- pkgs/development/ocaml-modules/lwd/nottui-unix.nix | 2 -- pkgs/development/ocaml-modules/lwd/nottui.nix | 4 ++-- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/do/docfd/package.nix b/pkgs/by-name/do/docfd/package.nix index 925a5ba07a51..6e4d4663bb5e 100644 --- a/pkgs/by-name/do/docfd/package.nix +++ b/pkgs/by-name/do/docfd/package.nix @@ -3,6 +3,7 @@ ocamlPackages, stdenv, fetchFromGitHub, + fetchpatch, python3, dune, makeWrapper, @@ -25,8 +26,16 @@ ocamlPackages.buildDunePackage rec { hash = "sha256-d7c72jXadwBtUqarfdGnEDo9yFwCAeEX0GGVqCe70Ak="; }; - # Compatibility with nottui ≥ 0.4 - patches = [ ./nottui-unix.patch ]; + patches = [ + # Compatibility with nottui ≥ 0.4 + ./nottui-unix.patch + # Compatibility with lwd ≥ 0.5 + (fetchpatch { + url = "https://github.com/darrenldl/docfd/commit/439ff57e80778f684cf8526b3b33c745a02da2a7.patch"; + includes = [ "*.ml" ]; + hash = "sha256-bB+zta2VcrDd42FUD9ExBui787LmtN3PMyb/MJQO7u0="; + }) + ]; nativeBuildInputs = [ python3 diff --git a/pkgs/development/ocaml-modules/lwd/default.nix b/pkgs/development/ocaml-modules/lwd/default.nix index 771b003b50a2..0f59c3f370a4 100644 --- a/pkgs/development/ocaml-modules/lwd/default.nix +++ b/pkgs/development/ocaml-modules/lwd/default.nix @@ -5,15 +5,13 @@ seq, }: -buildDunePackage rec { +buildDunePackage (finalAttrs: { pname = "lwd"; - version = "0.4"; - - minimalOCamlVersion = "4.08"; + version = "0.5"; src = fetchurl { - url = "https://github.com/let-def/lwd/releases/download/v${version}/lwd-${version}.tbz"; - hash = "sha256-nnFltlBWfPOerF4HuVNGzXcZxRSdsM+abeD5ZdQ+x8U="; + url = "https://github.com/let-def/lwd/releases/download/v${finalAttrs.version}/lwd-${finalAttrs.version}.tbz"; + hash = "sha256-YAZjeLuhAxUCB3RrBul4u70g5TEqT2C7Z09YbYyPZOY="; }; propagatedBuildInputs = [ seq ]; @@ -24,4 +22,4 @@ buildDunePackage rec { maintainers = [ lib.maintainers.alizter ]; homepage = "https://github.com/let-def/lwd"; }; -} +}) diff --git a/pkgs/development/ocaml-modules/lwd/nottui-unix.nix b/pkgs/development/ocaml-modules/lwd/nottui-unix.nix index 88a3839d152e..6068ab56af8a 100644 --- a/pkgs/development/ocaml-modules/lwd/nottui-unix.nix +++ b/pkgs/development/ocaml-modules/lwd/nottui-unix.nix @@ -3,7 +3,6 @@ buildDunePackage, lwd, nottui, - notty, }: buildDunePackage { @@ -14,7 +13,6 @@ buildDunePackage { propagatedBuildInputs = [ lwd nottui - notty ]; meta = { diff --git a/pkgs/development/ocaml-modules/lwd/nottui.nix b/pkgs/development/ocaml-modules/lwd/nottui.nix index ccb134674c36..76c94f21aa38 100644 --- a/pkgs/development/ocaml-modules/lwd/nottui.nix +++ b/pkgs/development/ocaml-modules/lwd/nottui.nix @@ -2,7 +2,7 @@ lib, buildDunePackage, lwd, - notty, + notty-community, }: buildDunePackage { @@ -12,7 +12,7 @@ buildDunePackage { propagatedBuildInputs = [ lwd - notty + notty-community ]; meta = { From 827f109d8979f094cd0f3a0e5ca1e083f4e8c643 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 5 May 2026 09:15:49 +0200 Subject: [PATCH 3/3] ocamlPackages.notty: drop --- .../instant-messengers/jackline/default.nix | 6 +++- pkgs/by-name/do/docfd/nottui-unix.patch | 35 +++++++++++-------- pkgs/by-name/do/docfd/package.nix | 2 +- pkgs/top-level/ocaml-packages.nix | 3 +- 4 files changed, 27 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/jackline/default.nix b/pkgs/applications/networking/instant-messengers/jackline/default.nix index 35099f2bf1fe..6cff3de031f0 100644 --- a/pkgs/applications/networking/instant-messengers/jackline/default.nix +++ b/pkgs/applications/networking/instant-messengers/jackline/default.nix @@ -19,6 +19,10 @@ buildDunePackage { hash = "sha256-6QZZ77C1G3x/GOJsUEQMrCatVsyyxNjq36ez/TgeHSY="; }; + postPatch = '' + substituteInPlace cli/dune --replace-warn 'notty notty.lwt' 'notty-community.lwt' + ''; + nativeBuildInputs = [ ppx_sexp_conv ppx_deriving @@ -35,7 +39,7 @@ buildDunePackage { otr astring ptime - notty + notty-community sexplib hex uchar diff --git a/pkgs/by-name/do/docfd/nottui-unix.patch b/pkgs/by-name/do/docfd/nottui-unix.patch index 03a61576d00d..738c7871dafc 100644 --- a/pkgs/by-name/do/docfd/nottui-unix.patch +++ b/pkgs/by-name/do/docfd/nottui-unix.patch @@ -1,20 +1,8 @@ -diff --git a/bin/dune b/bin/dune -index e0ddc1f..a4e8523 100644 ---- a/bin/dune -+++ b/bin/dune -@@ -47,6 +47,7 @@ - notty - notty.unix - nottui -+ nottui-unix - lwd - oseq - eio -diff --git a/bin/ui_base.ml b/bin/ui_base.ml -index f56ee8d..8d8ed70 100644 +diff --git a/bin/UI_base.ml b/bin/UI_base.ml +index efb1d14..ce6a2a4 100644 --- a/bin/UI_base.ml +++ b/bin/UI_base.ml -@@ -587,7 +587,7 @@ let ui_loop ~quit ~term root = +@@ -787,7 +787,7 @@ let ui_loop ~quit ~term root = if term_width <> prev_term_width || term_height <> prev_term_height then ( Lwd.set Vars.term_width_height (term_width, term_height) ); @@ -23,3 +11,20 @@ index f56ee8d..8d8ed70 100644 ~process_event:true ~timeout:0.05 ~renderer +diff --git a/bin/dune b/bin/dune +index c4905a4..7c7b55d 100644 +--- a/bin/dune ++++ b/bin/dune +@@ -44,9 +44,10 @@ + containers.unix + cmdliner + fmt +- notty +- notty.unix ++ notty-community ++ notty-community.unix + nottui ++ nottui-unix + lwd + oseq + eio diff --git a/pkgs/by-name/do/docfd/package.nix b/pkgs/by-name/do/docfd/package.nix index 6e4d4663bb5e..d039b22058e7 100644 --- a/pkgs/by-name/do/docfd/package.nix +++ b/pkgs/by-name/do/docfd/package.nix @@ -53,7 +53,7 @@ ocamlPackages.buildDunePackage rec { lwd nottui nottui-unix - notty + notty-community ocaml_sqlite3 ocolor oseq diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 343f0b74899b..0b7da03ab0a3 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1442,8 +1442,6 @@ let nottui-unix = callPackage ../development/ocaml-modules/lwd/nottui-unix.nix { }; - notty = callPackage ../development/ocaml-modules/notty { }; - notty-community = callPackage ../development/ocaml-modules/notty-community { }; npy = callPackage ../development/ocaml-modules/npy { @@ -2363,6 +2361,7 @@ let dune_2 = pkgs.dune_2; # Added 2025-12-08 dune_3 = pkgs.dune_3; # Added 2025-12-08 gd4o = throw "ocamlPackages.gd4o is not maintained, use ocamlPackages.gd instead"; + notty = throw "2026-05-05: notty is no longer maintained, use notty-community instead"; ocaml-freestanding = throw "ocamlPackages.ocaml-freestanding has been removed due to being broken for more than a year; see RFC 180"; # Added 2026-02-05 ocaml-vdom = throw "2023-10-09: ocamlPackages.ocaml-vdom was renamed to ocamlPackages.vdom"; ocaml_lwt = throw "ocamlPackages.ocaml_lwt has been renamed to ocamlPackages.lwt"; # Added 2025-12-05