2021-04-25 22:27:21 +01:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, ncurses, db }:
|
2009-04-16 20:28:57 +01:00
|
|
|
|
2021-04-25 22:27:21 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nvi";
|
|
|
|
version = "1.81.6";
|
2009-04-16 20:28:57 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-04-25 22:27:21 +01:00
|
|
|
url = "https://deb.debian.org/debian/pool/main/n/nvi/nvi_${version}.orig.tar.gz";
|
|
|
|
sha256 = "13cp9iz017bk6ryi05jn7drbv7a5dyr201zqd3r4r8srj644ihwb";
|
2009-04-16 20:28:57 +01:00
|
|
|
};
|
|
|
|
|
2021-04-25 22:27:21 +01:00
|
|
|
patches = [
|
|
|
|
# Fix runtime error with modern versions of db.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://src.fedoraproject.org/rpms/nvi/raw/f33/f/nvi-03-db4.patch";
|
|
|
|
sha256 = "1vpnly3dcldwl8gwl0jrh5yh0vhgbdhsh6xn7lnwhrawlvk6d55y";
|
|
|
|
})
|
2009-04-16 20:28:57 +01:00
|
|
|
|
2021-04-25 22:27:21 +01:00
|
|
|
# Fix build with Glibc.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://src.fedoraproject.org/rpms/nvi/raw/f33/f/nvi-20-glibc_has_grantpt.patch";
|
|
|
|
sha256 = "1ypqj263wh53m5rgiag5c4gy1rksj2waginny1lcj34n72p2dsml";
|
|
|
|
})
|
|
|
|
];
|
2009-04-16 20:28:57 +01:00
|
|
|
|
2021-04-25 22:27:21 +01:00
|
|
|
buildInputs = [ ncurses db ];
|
2009-04-16 20:28:57 +01:00
|
|
|
|
2021-04-25 22:27:21 +01:00
|
|
|
preConfigure = ''
|
|
|
|
cd build.unix
|
2009-04-16 20:28:57 +01:00
|
|
|
'';
|
2021-04-25 22:27:21 +01:00
|
|
|
configureScript = "../dist/configure";
|
|
|
|
configureFlags = [ "vi_cv_path_preserve=/tmp" ];
|
2009-04-16 20:28:57 +01:00
|
|
|
|
2021-04-25 22:27:21 +01:00
|
|
|
meta = with lib; {
|
2009-04-16 20:28:57 +01:00
|
|
|
description = "The Berkeley Vi Editor";
|
2021-04-25 22:27:21 +01:00
|
|
|
license = licenses.free;
|
|
|
|
platforms = platforms.unix;
|
2009-04-16 20:28:57 +01:00
|
|
|
};
|
|
|
|
}
|