2021-01-15 14:21:58 +01:00
|
|
|
{ fetchurl, fetchpatch, lib, stdenv, ncurses }:
|
2009-04-16 21:28:42 +02:00
|
|
|
|
2021-11-07 21:29:51 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "elvis";
|
|
|
|
version = "2.2_0";
|
2009-04-16 21:28:42 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-07 21:29:51 +01:00
|
|
|
url = "http://www.the-little-red-haired-girl.org/pub/elvis/elvis-${version}.tar.gz";
|
2009-04-16 21:28:42 +02:00
|
|
|
sha256 = "182fj9qzyq6cjq1r849gpam6nq9smwv9f9xwaq84961p56r6d14s";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
2021-11-07 21:29:51 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mbert/elvis/commit/076cf4ad5cc993be0c6195ec0d5d57e5ad8ac1eb.patch";
|
|
|
|
sha256 = "0yzkc1mxjwg09mfmrk20ksa0vfnb2x83ndybwvawq4xjm1qkcahc";
|
|
|
|
})
|
|
|
|
];
|
2017-03-22 00:44:57 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace '-lcurses' '-lncurses'
|
|
|
|
'';
|
|
|
|
|
2009-04-16 21:28:42 +02:00
|
|
|
preConfigure = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/man/man1
|
2009-04-16 21:28:42 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin $out/share/elvis $out/share/elvis/doc
|
2009-04-16 21:28:42 +02:00
|
|
|
cp elvis ref elvtags elvfmt $out/bin
|
|
|
|
cp -R data/* $out/share/elvis
|
|
|
|
cp doc/* $out/share/elvis/doc
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/man/man1
|
2009-04-16 21:28:42 +02:00
|
|
|
for a in doc/*.man; do
|
|
|
|
cp $a $out/share/man/man1/`basename $a .man`.1
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2018-07-25 23:44:21 +02:00
|
|
|
configureFlags = [ "--ioctl=termios" ];
|
2009-04-16 21:28:42 +02:00
|
|
|
|
|
|
|
meta = {
|
2020-11-13 09:24:48 +01:00
|
|
|
homepage = "http://elvis.the-little-red-haired-girl.org/";
|
2009-04-16 21:28:42 +02:00
|
|
|
description = "A vi clone for Unix and other operating systems";
|
2021-01-15 14:21:58 +01:00
|
|
|
license = lib.licenses.free;
|
2009-04-16 21:28:42 +02:00
|
|
|
};
|
|
|
|
}
|