Merge #227677: vim: Fix install phase parallelism

...and harden against future failures
Merge into staging-next.
This commit is contained in:
Vladimír Čunát 2023-04-24 20:39:23 +02:00
commit b7ca5d7406
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -15,7 +15,7 @@ in
stdenv.mkDerivation {
pname = "vim";
inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta;
inherit (common) version src postPatch hardeningDisable enableParallelBuilding enableParallelInstalling meta;
nativeBuildInputs = [ gettext pkg-config ];
buildInputs = [ ncurses bash gawk ]
@ -50,6 +50,15 @@ stdenv.mkDerivation {
ln -s $out/bin/vim $out/bin/vi
mkdir -p $out/share/vim
cp "${vimrc}" $out/share/vim/vimrc
# Prevent bugs in the upstream makefile from silently failing and missing outputs.
# Some of those are build-time requirements for other packages.
for tool in ex xxd vi view vimdiff; do
if [ ! -e "$out/bin/$tool" ]; then
echo "ERROR: install phase did not install '$tool'."
exit 1
fi
done
'';
__impureHostDeps = [ "/dev/ptmx" ];