mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
cc390828ef
Fixes GHSA-v2x2-cjcg-f9jm https://www.openwall.com/lists/oss-security/2024/08/22/3
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{ lib, fetchFromGitHub }:
|
|
rec {
|
|
version = "9.1.0689";
|
|
|
|
outputs = [ "out" "xxd" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "vim";
|
|
repo = "vim";
|
|
rev = "v${version}";
|
|
hash = "sha256-87y/STnGB2Yf64TMwCd6VCFF2kvy+DmNyaXVKPIc86E=";
|
|
};
|
|
|
|
enableParallelBuilding = true;
|
|
enableParallelInstalling = false;
|
|
|
|
hardeningDisable = [ "fortify" ];
|
|
|
|
# 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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Most popular clone of the VI editor";
|
|
homepage = "http://www.vim.org";
|
|
license = licenses.vim;
|
|
maintainers = with maintainers; [ das_j equirosa philiptaron ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "vim";
|
|
outputsToInstall = [ "out" "xxd" ];
|
|
};
|
|
}
|