btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / je / jed / package.nix
blob3bf06286f6d5c76b33af6cfb1804ad242bc02f19
1 { lib, stdenv, fetchzip
2 , pkg-config
3 , gpm
4 , libXext
5 , libXft
6 , libXt
7 , ncurses5
8 , slang
9 } :
11 stdenv.mkDerivation rec {
12   pname = "jed";
13   version = "0.99-19";
15   src = fetchzip {
16     url = "https://www.jedsoft.org/releases/${pname}/${pname}-${version}.tar.bz2";
17     sha256 = "sha256-vzeX0P+2+IuKtrX+2lQDeJj7VMDS6XurD2pb2jhxy2Q=";
18   };
20   nativeBuildInputs = [ pkg-config ];
21   buildInputs = [
22     gpm
23     libXext
24     libXft
25     libXt
26     ncurses5
27     slang
28   ];
30   configureFlags = [
31     "CC=${stdenv.cc.targetPrefix}cc"
32     "--with-slang=${slang}"
33     "JED_ROOT=${placeholder "out"}/share/jed"
34   ];
36   makeFlags = [
37     "jed" "xjed" "rgrep"
38   ];
40   postPatch = ''
41     for i in autoconf/Makefile autoconf/Makefile.in \
42              doc/tm/Makefile src/Makefile.in; do
43       sed -e 's|/bin/cp|cp|' -i $i
44     done
45     for i in autoconf/aclocal.m4 configure; do
46       sed -e 's|ncurses5|ncurses|' -i $i
47     done
48   '';
50   postInstall = ''
51     install -D src/objs/rgrep $out/bin
52   '';
54   meta = with lib; {
55     description = "Programmable text editor written around S-Lang";
56     longDescription = ''
57       JED is a freely available text editor for Unix, VMS, MSDOS, OS/2, BeOS,
58       QNX, and win9X/NT platforms. Although it is a powerful editor designed for
59       use by programmers, its drop-down menu facility make it one of the
60       friendliest text editors around. Hence it is ideal for composing simple
61       email messages as well as editing complex programs in a variety of
62       computer languages.
64       JED makes extensive use of the S-Lang library, which endows it with the
65       powerful S-Lang scripting language. Some of its features are:
67       - Color syntax highlighting on color terminals, e.g., Linux console or a
68         remote color terminal via dialup (as well as Xjed)
69       - Folding support
70       - Drop-down menus on _ALL_ terminals/platforms
71       - Emulation of Emacs, EDT, Wordstar, Borland, and Brief editors
72       - Extensible in the C-like S-Lang language making the editor completely
73         customizable.
74       - Capable of reading GNU info files from within JED's info browser
75       - A variety of programming modes (with syntax highlighting) are available
76         including C, C++, FORTRAN, TeX, HTML, SH, python, IDL, DCL, NROFF...
77       - Edit TeX files with AUC-TeX style editing (BiBTeX support too)
78       - Asynchronous subprocess support allowing one to compile from within the
79         editor
80       - Built-in support for the GPM mouse driver on Linux console
81       - Abbreviation mode and Dynamic abbreviation mode
82       - 8 bit clean with mute/dead key support
83       - Supported on most Unix, VMS, OS/2, MSDOS (386+), win9X/NT, QNX, and BeOS
84         systems
85       - Rectangular cut/paste; regular expressions; incremental searches; search
86         replace across multiple files; multiple windows; multiple buffers; shell
87         modes; directory editor (dired); mail; rmail; ispell; and much, much
88         more
89     '';
90     homepage = "https://www.jedsoft.org/jed/index.html";
91     license = licenses.gpl2Plus;
92     platforms = slang.meta.platforms;
93   };
95 # TODO: build tex documentation