Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions pkgs/development/ocaml-modules/ansi/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
lib,
buildDunePackage,
fetchFromGitHub,
astring,
fmt,
tyxml,
alcotest,
}:

buildDunePackage (finalAttrs: {
pname = "ansi";
version = "0.7.0";

minimalOCamlVersion = "4.10";

src = fetchFromGitHub {
owner = "ocurrent";
repo = "ansi";
tag = finalAttrs.version;
hash = "sha256-VZR8hz2v4gAvTkizBt59DSYr3tGPWT1Iid8m8YQx48Y=";
};

propagatedBuildInputs = [
astring
fmt
tyxml
];

checkInputs = [
alcotest
];

doCheck = true;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's the default and can be removed.

@OlivierNicole OlivierNicole Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think so? It’s false by default in mkDerivation, and I don’t see it being set in the definition of buildDunePackage.


meta = {
description = "ANSI escape sequence parser";
longDescription = ''
This package provides a basic ANSI escape parser. Program output (such as
build logs) often includes ANSI escape codes to colour and style the output.
This library interprets some of the common codes and can convert them to
HTML, producing basic styled output (e.g. highlighting errors in red).
'';
homepage = "https://github.com/ocurrent/ansi";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.otini ];
Comment thread
OlivierNicole marked this conversation as resolved.
Outdated
};
})
2 changes: 2 additions & 0 deletions pkgs/top-level/ocaml-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ let

angstrom-unix = callPackage ../development/ocaml-modules/angstrom-unix { };

ansi = callPackage ../development/ocaml-modules/ansi { };

ansiterminal = callPackage ../development/ocaml-modules/ansiterminal { };

ao = callPackage ../development/ocaml-modules/ao { };
Expand Down
Loading