Skip to content

Commit 5e5abe8

Browse files
authored
elvis: modernize (#341950)
2 parents 75d9568 + 1fec673 commit 5e5abe8

File tree

3 files changed

+75
-51
lines changed

3 files changed

+75
-51
lines changed

pkgs/applications/editors/elvis/default.nix

Lines changed: 0 additions & 49 deletions
This file was deleted.

pkgs/by-name/el/elvis/package.nix

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
lib,
3+
fetchurl,
4+
fetchpatch,
5+
installShellFiles,
6+
ncurses,
7+
stdenv,
8+
}:
9+
10+
stdenv.mkDerivation (finalAttrs: {
11+
pname = "elvis";
12+
version = "2.2_0";
13+
14+
src = fetchurl {
15+
urls = [
16+
"http://www.the-little-red-haired-girl.org/pub/elvis/elvis-${finalAttrs.version}.tar.gz"
17+
"http://www.the-little-red-haired-girl.org/pub/elvis/old/elvis-${finalAttrs.version}.tar.gz"
18+
];
19+
hash = "sha256-moRmsik3mEQQVrwnlzavOmFrqrovEZQDlsxg/3GSTqA=";
20+
};
21+
22+
patches = [
23+
(fetchpatch {
24+
name = "0000-resolve-stdio-getline-naming-conflict.patch";
25+
url = "https://github.com/mbert/elvis/commit/076cf4ad5cc993be0c6195ec0d5d57e5ad8ac1eb.patch";
26+
hash = "sha256-DCo2caiyE8zV5ss3O1AXy7oNlJ5AzFxdTeBx2Wtg83s=";
27+
})
28+
];
29+
30+
outputs = [
31+
"out"
32+
"man"
33+
];
34+
35+
nativeBuildInputs = [ installShellFiles ];
36+
37+
buildInputs = [ ncurses ];
38+
39+
configureFlags = [ "--ioctl=termios" ];
40+
41+
strictDeps = false;
42+
43+
postPatch = ''
44+
substituteInPlace configure \
45+
--replace-fail '-lcurses' '-lncurses'
46+
'';
47+
48+
installPhase = ''
49+
runHook preInstall
50+
51+
installBin elvis ref elvtags elvfmt
52+
53+
pushd doc
54+
for page in *.man; do
55+
installManPage $page
56+
rm $page
57+
done
58+
popd
59+
60+
mkdir -p $out/share/doc/elvis-${finalAttrs.version}/ $out/share/elvis/
61+
cp -R data/* $out/share/elvis/
62+
cp doc/* $out/share/doc/elvis-${finalAttrs.version}/
63+
64+
runHook postInstall
65+
'';
66+
67+
meta = {
68+
homepage = "http://elvis.the-little-red-haired-girl.org/";
69+
description = "Vi clone for Unix and other operating systems";
70+
license = lib.licenses.free;
71+
mainProgram = "elvis";
72+
maintainers = with lib.maintainers; [ AndersonTorres ];
73+
platforms = lib.platforms.unix;
74+
};
75+
})

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29210,8 +29210,6 @@ with pkgs;
2921029210
autoreconfHook = buildPackages.autoreconfHook269;
2921129211
};
2921229212

29213-
elvis = callPackage ../applications/editors/elvis { };
29214-
2921529213
inherit (recurseIntoAttrs (callPackage ../applications/editors/emacs { }))
2921629214
emacs28
2921729215
emacs28-gtk2

0 commit comments

Comments
 (0)