Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildDunePackage, fetchFromGitHub, ocaml, react, charInfo_width, result, uchar, uutf, uucp, uuseg }:
2
3let
4 switch =
5 if lib.versionAtLeast ocaml.version "4.08"
6 then
7 {
8 version = "3.2.0";
9 sha256 = "sha256-6yKHE30nVFXo8hGdCx+GO4VYYGbi802aMdN2XuYMJ7w=";
10 propagatedBuildInputs = [ react result uchar uutf uucp uuseg ];
11 }
12 else
13 {
14 version = "3.1.0";
15 sha256 = "04vr1a94imsghm98iigc35rhifsz0rh3qz2qm0wam2wvp6vmrx0p";
16 propagatedBuildInputs = [ charInfo_width react ];
17 };
18in
19
20buildDunePackage rec {
21 pname = "zed";
22
23 inherit (switch) version propagatedBuildInputs;
24
25 duneVersion = "3";
26
27 src = fetchFromGitHub {
28 owner = "ocaml-community";
29 repo = pname;
30 rev = version;
31 sha256 = switch.sha256;
32 };
33
34 meta = {
35 description = "Abstract engine for text edition in OCaml";
36 longDescription = ''
37 Zed is an abstract engine for text edition. It can be used to write text editors, edition widgets, readlines, ...
38
39 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.
40
41 To support efficient text edition capabilities, Zed provides macro recording and cursor management facilities.
42 '';
43 inherit (src.meta) homepage;
44 license = lib.licenses.bsd3;
45 maintainers = [
46 lib.maintainers.gal_bolle
47 ];
48 };
49}