about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/zed/default.nix
blob: 2922a57244b98ec8a5266fca0ac5b8f521ac8fe1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ 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=";
        propagatedBuildInputs = [ react result uchar uutf uucp uuseg ];
      }
    else
      {
        version = "3.1.0";
        sha256 = "04vr1a94imsghm98iigc35rhifsz0rh3qz2qm0wam2wvp6vmrx0p";
        propagatedBuildInputs = [ charInfo_width react ];
      };
in

buildDunePackage rec {
  pname = "zed";

  inherit (switch) version propagatedBuildInputs;

  duneVersion = "3";

  src = fetchFromGitHub {
    owner = "ocaml-community";
    repo = pname;
    rev = version;
    sha256 = switch.sha256;
  };

  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.
    '';
    inherit (src.meta) homepage;
    license = lib.licenses.bsd3;
    maintainers = [
      lib.maintainers.gal_bolle
    ];
  };
}