···1+{ stdenv, fetchFromGitHub, ncurses, texinfo, tetex, perl, ghostscript }:
2+3+4+stdenv.mkDerivation rec {
5+ name = "ne-${version}";
6+ version = "3.0.1";
7+ src = fetchFromGitHub {
8+ owner = "vigna";
9+ repo = "ne";
10+ rev = version;
11+ sha256 = "05inzhlqlf4ka22q78q389pr34bsb4lgp1i5qh550vjkb2cvbdfp";
12+ };
13+ buildInputs = [ ncurses tetex texinfo perl ghostscript ];
14+ dontBuild = true;
15+ installPhase = ''
16+ substituteInPlace src/makefile --replace "CC=c99" "cc=gcc"
17+ substituteInPlace src/makefile --replace "-lcurses" "-lncurses"
18+ substituteInPlace makefile --replace "./version.pl" "perl version.pl"
19+ cd doc && make && cd ..
20+ cd src && make && cd ..
21+ make PREFIX=$out install
22+ '';
23+24+ meta = {
25+ description = "the nice editor";
26+ homepage = https://github.com/vigna/ne;
27+ longDescription = ''
28+ ne is a free (GPL'd) text editor based on the POSIX standard that runs (we hope) on almost any
29+UN*X machine. ne is easy to use for the beginner, but powerful and fully configurable for the wizard,
30+and most sparing in its resource usage. See the manual for some highlights of ne's features.
31+ '';
32+ license = stdenv.lib.licenses.gpl3;
33+ };
34+}