From 64c2e5dcc201f72dd82da9eb3f19a3904f2af349 Mon Sep 17 00:00:00 2001 From: Olivier Nicole Date: Fri, 26 Jun 2026 09:53:37 +0200 Subject: [PATCH] ocamlPackages.grace: init at 0.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assisted-by: Claude Sonnet 4.6 (Anthropic) Co-authored-by: Léo <16472988+redianthus@users.noreply.github.com> Co-authored-by: Vincent Laporte (cherry picked from commit 26f41474f631d65bbad0d5a5e1948b49c70f1bbe) --- .../ocaml-modules/grace/default.nix | 50 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/ocaml-modules/grace/default.nix diff --git a/pkgs/development/ocaml-modules/grace/default.nix b/pkgs/development/ocaml-modules/grace/default.nix new file mode 100644 index 000000000000..be8598d983d8 --- /dev/null +++ b/pkgs/development/ocaml-modules/grace/default.nix @@ -0,0 +1,50 @@ +{ + lib, + buildDunePackage, + fetchFromGitHub, + fmt, + iter, + uutf, + sexplib, + ppx_sexp_conv, + core, + ppx_jane, + dedent ? null, +}: + +buildDunePackage (finalAttrs: { + pname = "grace"; + version = "0.3.0"; + + minimalOCamlVersion = "4.14"; + + src = fetchFromGitHub { + owner = "johnyob"; + repo = "grace"; + tag = finalAttrs.version; + hash = "sha256-V5K9RGk47K/R+q4wS1FU02kMi1uWSCgdUjKHk7uXuGw="; + }; + + propagatedBuildInputs = [ + fmt + iter + uutf + sexplib + ppx_sexp_conv + ]; + + checkInputs = [ + core + ppx_jane + dedent + ]; + + doCheck = true; + + meta = { + description = "A fancy diagnostics library that allows your compilers to exit with grace"; + homepage = "https://github.com/johnyob/grace"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ otini ]; + }; +}) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 7e578f84b7b9..994d4ac6a898 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -762,6 +762,8 @@ let inherit (pkgs) gnuplot; }; + grace = callPackage ../development/ocaml-modules/grace { }; + graphics = if lib.versionOlder "4.09" ocaml.version then callPackage ../development/ocaml-modules/graphics { }