From 4e5ec8423ee22dba82b01ca4fe4696a2059f9556 Mon Sep 17 00:00:00 2001 From: Volker Diels-Grabsch Date: Tue, 30 Jun 2026 11:41:41 +0200 Subject: [PATCH 1/3] ocamlPackages.alcobar: init at 0.3.1 --- .../ocaml-modules/alcobar/default.nix | 49 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/ocaml-modules/alcobar/default.nix diff --git a/pkgs/development/ocaml-modules/alcobar/default.nix b/pkgs/development/ocaml-modules/alcobar/default.nix new file mode 100644 index 000000000000..fa91d72dacd8 --- /dev/null +++ b/pkgs/development/ocaml-modules/alcobar/default.nix @@ -0,0 +1,49 @@ +{ + afl-persistent, + alcotest, + buildDunePackage, + calendar, + cmdliner, + fetchurl, + fpath, + lib, + ocaml, + pprint, + uucp, + uunf, +}: + +buildDunePackage (finalAttrs: { + pname = "alcobar"; + version = "0.3.1"; + minimalOCamlVersion = "4.10"; + __structuredAttrs = true; + + src = fetchurl { + url = "https://github.com/samoht/alcobar/releases/download/v${finalAttrs.version}/alcobar-${finalAttrs.version}.tbz"; + hash = "sha256-V2UnvLrtf+XXkp7uFlrIpxg6+fZqwhCS/J7C3Nw+eVU="; + }; + + propagatedBuildInputs = [ + afl-persistent + alcotest + cmdliner + ]; + + checkInputs = [ + calendar + fpath + pprint + uucp + uunf + ]; + doCheck = lib.versionAtLeast ocaml.version "5.0"; + + meta = { + description = "Crowbar with an Alcotest-compatible API"; + homepage = "https://github.com/samoht/alcobar"; + changelog = "https://github.com/samoht/alcobar/blob/v${finalAttrs.version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vog ]; + }; +}) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 6858539d4229..754f86881773 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -24,6 +24,8 @@ let aeneas = callPackage ../development/ocaml-modules/aeneas { }; + alcobar = callPackage ../development/ocaml-modules/alcobar { }; + alcotest = callPackage ../development/ocaml-modules/alcotest { }; alcotest-lwt = callPackage ../development/ocaml-modules/alcotest/lwt.nix { }; From a7f2fc98cf6b5be2bf283b29245e0a8ac61b920f Mon Sep 17 00:00:00 2001 From: Volker Diels-Grabsch Date: Tue, 30 Jun 2026 11:42:25 +0200 Subject: [PATCH 2/3] ocamlPackages.cascade: init at 0-unstable-2026-06-26 --- .../ocaml-modules/cascade/default.nix | 52 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/ocaml-modules/cascade/default.nix diff --git a/pkgs/development/ocaml-modules/cascade/default.nix b/pkgs/development/ocaml-modules/cascade/default.nix new file mode 100644 index 000000000000..e59bc6fec7d0 --- /dev/null +++ b/pkgs/development/ocaml-modules/cascade/default.nix @@ -0,0 +1,52 @@ +{ + alcobar, + buildDunePackage, + dune-build-info, + fetchFromGitHub, + lambdasoup, + lib, + logs, + mdx, + memtrace, + psq, + uutf, +}: + +buildDunePackage (finalAttrs: { + pname = "cascade"; + version = "0-unstable-2026-06-26"; + minimalOCamlVersion = "5.2"; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "samoht"; + repo = "cascade"; + rev = "434c07be7ec1a63213a234946d57937e4d080feb"; + hash = "sha256-6g8UKsXdR0PxihrOiMVC36q7+bomMByPDbmuISL7h4U="; + }; + + propagatedBuildInputs = [ + dune-build-info + logs + psq + uutf + ]; + buildInputs = [ + lambdasoup + memtrace + ]; + + nativeCheckInputs = [ mdx.bin ]; + checkInputs = [ + (mdx.override { inherit logs; }) + alcobar + ]; + doCheck = true; + + meta = { + description = "CSS generation and manipulation library for OCaml"; + homepage = "https://github.com/samoht/cascade"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vog ]; + }; +}) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 754f86881773..4f5e425673bf 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -245,6 +245,8 @@ let git-binary = pkgs.git; }; + cascade = callPackage ../development/ocaml-modules/cascade { }; + cbor = callPackage ../development/ocaml-modules/cbor { }; cfstream = callPackage ../development/ocaml-modules/cfstream { }; From 8ea5e3ec1c2a922575fddb19b45c9b0ccad15327 Mon Sep 17 00:00:00 2001 From: Volker Diels-Grabsch Date: Tue, 30 Jun 2026 11:43:09 +0200 Subject: [PATCH 3/3] ocamlPackages.tw: init at 0-unstable-2026-06-23 --- pkgs/development/ocaml-modules/tw/default.nix | 55 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/ocaml-packages.nix | 2 + 3 files changed, 59 insertions(+) create mode 100644 pkgs/development/ocaml-modules/tw/default.nix diff --git a/pkgs/development/ocaml-modules/tw/default.nix b/pkgs/development/ocaml-modules/tw/default.nix new file mode 100644 index 000000000000..55f73dbe105c --- /dev/null +++ b/pkgs/development/ocaml-modules/tw/default.nix @@ -0,0 +1,55 @@ +{ + buildDunePackage, + cascade, + cmdliner, + fetchFromGitHub, + fmt, + lib, + ocaml, +}: + +buildDunePackage (finalAttrs: { + pname = "tw"; + version = "0-unstable-2026-06-23"; + minimalOCamlVersion = "5.2"; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "samoht"; + repo = "tw"; + rev = "594d35df46ec2afcfe97632923331badf2940b93"; + hash = "sha256-vCRq0FCBIxc/AQg+R2Hig7nqwJGxgy2jedLbAsKaIoA="; + }; + + propagatedBuildInputs = [ cascade ]; + buildInputs = [ + cmdliner + fmt + ]; + + # Disabling tests because they check for byte-for-byte identical + # output with tailwindcss, so they are tied to a specific + # tailwindcss version, and would prevent independent upgrades of tw + # and tailwindcss. + doCheck = false; + + outputs = [ + "bin" + "lib" + "out" + ]; + + installPhase = '' + runHook preInstall + dune install --prefix=$bin --libdir=$lib/lib/ocaml/${ocaml.version}/site-lib + runHook postInstall + ''; + + meta = { + description = "Type-safe Tailwind CSS v4 in OCaml"; + homepage = "https://github.com/samoht/tw"; + mainProgram = "tw"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vog ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b1e4c87fc3a..287d06540253 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1213,6 +1213,8 @@ with pkgs; ) ); + tw = ocamlPackages.tw.bin; + wrapRetroArch = retroarch-bare.wrapper; # Aliases kept here because they are easier to use diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 4f5e425673bf..974759c5491b 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -2191,6 +2191,8 @@ let tuntap = callPackage ../development/ocaml-modules/tuntap { }; + tw = callPackage ../development/ocaml-modules/tw { }; + twt = callPackage ../development/ocaml-modules/twt { }; type_eq = callPackage ../development/ocaml-modules/type_eq { };