2021-01-15 13:21:58 +00:00
|
|
|
{ fetchurl, lib, stdenv, ncurses }:
|
2009-04-16 20:28:57 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2009-04-16 20:28:57 +01:00
|
|
|
name = "nvi-1.79";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2010-12-15 09:39:30 +00:00
|
|
|
urls =
|
|
|
|
[ "ftp://ftp.eenet.ee/pub/cpan/src/misc/nvi-1.79.tar.gz"
|
|
|
|
"ftp://ftp.saintjoe.edu/pub/CPAN/src/misc/nvi-1.79.tar.gz"
|
|
|
|
"ftp://ftp.free.fr/.mirrors1/ftp.netbsd.org/packages/distfiles/nvi-1.79.tar.gz"
|
|
|
|
];
|
2009-04-16 20:28:57 +01:00
|
|
|
sha256 = "0cvf56rbylz7ksny6g2256sjg8yrsxrmbpk82r64rhi53sm8fnvm";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
2009-04-16 21:09:07 +01:00
|
|
|
# nvi tries to write to a usual tmp directory (/var/tmp),
|
|
|
|
# so we will force it to use /tmp.
|
2009-04-16 20:28:57 +01:00
|
|
|
patchPhase = ''
|
2015-05-01 02:23:25 +01:00
|
|
|
sed -i build/configure \
|
2009-04-16 21:09:07 +01:00
|
|
|
-e s@vi_cv_path_preserve=no@vi_cv_path_preserve=/tmp/vi.recover@ \
|
2017-01-12 03:14:12 +00:00
|
|
|
-e s@/var/tmp@@ \
|
|
|
|
-e s@-lcurses@-lncurses@
|
2009-04-16 20:28:57 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
mkdir mybuild
|
|
|
|
cd mybuild
|
|
|
|
../build/configure --prefix=$out --disable-curses
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin $out/share/vi/catalog
|
2009-04-16 20:28:57 +01:00
|
|
|
for a in dutch english french german ru_SU.KOI8-R spanish swedish; do
|
|
|
|
cp ../catalog/$a $out/share/vi/catalog
|
|
|
|
done
|
|
|
|
cp nvi $out/bin/nvi
|
|
|
|
ln -s $out/bin/nvi $out/bin/vi
|
|
|
|
ln -s $out/bin/nvi $out/bin/ex
|
|
|
|
ln -s $out/bin/nvi $out/bin/view
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/man/man1
|
2009-04-16 20:28:57 +01:00
|
|
|
cp ../docs/USD.doc/vi.man/vi.1 $out/share/man/man1/nvi.1
|
|
|
|
ln -s $out/share/man/man1/nvi.1 $out/share/man/man1/vi
|
|
|
|
ln -s $out/share/man/man1/nvi.1 $out/share/man/man1/ex
|
|
|
|
ln -s $out/share/man/man1/nvi.1 $out/share/man/man1/view
|
2009-09-20 22:54:23 +01:00
|
|
|
ln -s $out/bin/{,vi-}nvi # create a symlink so that all vi(m) users will find it
|
2009-04-16 20:28:57 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.bostic.com/vi/";
|
2009-04-16 20:28:57 +01:00
|
|
|
description = "The Berkeley Vi Editor";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.free;
|
2020-05-17 15:52:50 +01:00
|
|
|
broken = true; # since 2020-02-08
|
2009-04-16 20:28:57 +01:00
|
|
|
};
|
|
|
|
}
|