2020-04-24 23:36:52 +00:00
|
|
|
{ lib, fetchFromGitHub }:
|
|
|
|
rec {
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "9.1.0377";
|
2024-01-25 14:12:00 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "xxd" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vim";
|
|
|
|
repo = "vim";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-cfN/QbnpWIQmLtpXWPc1JnaaX+J10ietObN/B9lE1F0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2023-04-12 12:48:02 +00:00
|
|
|
enableParallelInstalling = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "fortify" ];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# Use man from $PATH; escape sequences are still problematic.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace runtime/ftplugin/man.vim \
|
|
|
|
--replace "/usr/bin/man " "man "
|
|
|
|
'';
|
|
|
|
|
|
|
|
# man page moving is done in postFixup instead of postInstall otherwise fixupPhase moves it right back where it was
|
|
|
|
postFixup = ''
|
|
|
|
moveToOutput bin/xxd "$xxd"
|
|
|
|
moveToOutput share/man/man1/xxd.1.gz "$xxd"
|
|
|
|
for manFile in $out/share/man/*/man1/xxd.1*; do
|
|
|
|
# moveToOutput does not take full paths or wildcards...
|
|
|
|
moveToOutput "share/man/$(basename "$(dirname "$(dirname "$manFile")")")/man1/xxd.1.gz" "$xxd"
|
|
|
|
done
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The most popular clone of the VI editor";
|
|
|
|
homepage = "http://www.vim.org";
|
|
|
|
license = licenses.vim;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ das_j equirosa philiptaron ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "vim";
|
2024-01-25 14:12:00 +00:00
|
|
|
outputsToInstall = [ "out" "xxd" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|