2022-10-20 15:35:19 +00:00
|
|
|
{ lib, buildDunePackage, fetchFromGitHub, ocaml, react, charInfo_width, result, uchar, uutf, uucp, uuseg }:
|
|
|
|
|
|
|
|
let
|
|
|
|
switch =
|
|
|
|
if lib.versionAtLeast ocaml.version "4.08"
|
|
|
|
then
|
|
|
|
{
|
|
|
|
version = "3.2.0";
|
|
|
|
sha256 = "sha256-6yKHE30nVFXo8hGdCx+GO4VYYGbi802aMdN2XuYMJ7w=";
|
|
|
|
duneVersion = "3";
|
|
|
|
propagatedBuildInputs = [ react result uchar uutf uucp uuseg ];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
version = "3.1.0";
|
|
|
|
sha256 = "04vr1a94imsghm98iigc35rhifsz0rh3qz2qm0wam2wvp6vmrx0p";
|
|
|
|
duneVersion = "2";
|
|
|
|
propagatedBuildInputs = [ charInfo_width react ];
|
|
|
|
};
|
|
|
|
in
|
2017-10-21 07:51:10 +00:00
|
|
|
|
2021-01-06 07:11:28 +00:00
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "zed";
|
2014-07-20 16:21:14 +00:00
|
|
|
|
2022-10-20 15:35:19 +00:00
|
|
|
inherit (switch) version duneVersion propagatedBuildInputs;
|
2014-07-20 16:21:14 +00:00
|
|
|
|
2021-01-06 07:11:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ocaml-community";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-10-20 15:35:19 +00:00
|
|
|
sha256 = switch.sha256;
|
2014-07-20 16:21:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Abstract engine for text edition in OCaml";
|
|
|
|
longDescription = ''
|
|
|
|
Zed is an abstract engine for text edition. It can be used to write text editors, edition widgets, readlines, ...
|
|
|
|
|
|
|
|
Zed uses Camomile to fully support the Unicode specification, and implements an UTF-8 encoded string type with validation, and a rope datastructure to achieve efficient operations on large Unicode buffers. Zed also features a regular expression search on ropes.
|
|
|
|
|
|
|
|
To support efficient text edition capabilities, Zed provides macro recording and cursor management facilities.
|
|
|
|
'';
|
2021-01-06 07:11:28 +00:00
|
|
|
inherit (src.meta) homepage;
|
2021-01-11 12:49:15 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2014-07-20 16:21:14 +00:00
|
|
|
maintainers = [
|
2021-01-11 12:49:15 +00:00
|
|
|
lib.maintainers.gal_bolle
|
2014-07-20 16:21:14 +00:00
|
|
|
];
|
|
|
|
};
|
2021-01-06 07:11:28 +00:00
|
|
|
}
|