3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/zed/default.nix

52 lines
1.8 KiB
Nix
Raw Normal View History

{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, camomile, react, dune, charInfo_width }:
2017-10-21 08:51:10 +01:00
let param =
if stdenv.lib.versionAtLeast ocaml.version "4.02" then
{
2020-09-16 04:57:46 +01:00
version = "3.1.0";
sha256 = "04vr1a94imsghm98iigc35rhifsz0rh3qz2qm0wam2wvp6vmrx0p";
2018-09-05 17:11:47 +01:00
buildInputs = [ dune ];
propagatedBuildInputs = [ charInfo_width ];
2017-10-21 08:51:10 +01:00
extra = {
2018-09-05 17:11:47 +01:00
buildPhase = "dune build -p zed";
inherit (dune) installPhase; };
2017-10-21 08:51:10 +01:00
} else {
version = "1.4";
sha256 = "0d8qfy0qiydrrqi8qc9rcwgjigql6vx9gl4zp62jfz1lmjgb2a3w";
buildInputs = [ ocamlbuild ];
propagatedBuildInputs = [ camomile ];
2017-10-21 08:51:10 +01:00
extra = { createFindlibDestdir = true; };
}
; in
2014-07-20 17:21:14 +01:00
2017-10-21 08:51:10 +01:00
stdenv.mkDerivation (rec {
inherit (param) version;
2014-07-20 17:21:14 +01:00
name = "ocaml-zed-${version}";
2015-02-01 19:03:45 +00:00
src = fetchzip {
url = "https://github.com/diml/zed/archive/${version}.tar.gz";
2017-10-21 08:51:10 +01:00
inherit (param) sha256;
2014-07-20 17:21:14 +01:00
};
buildInputs = [ ocaml findlib ] ++ param.buildInputs;
2014-07-20 17:21:14 +01:00
propagatedBuildInputs = [ react ] ++ param.propagatedBuildInputs;
2014-07-20 17:21:14 +01: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.
'';
homepage = "https://github.com/diml/zed";
2014-07-20 17:21:14 +01:00
license = stdenv.lib.licenses.bsd3;
platforms = ocaml.meta.platforms or [];
2014-07-20 17:21:14 +01:00
maintainers = [
stdenv.lib.maintainers.gal_bolle
];
};
2017-10-21 08:51:10 +01:00
} // param.extra)