mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 13:05:08 +00:00
Merge pull request #178353 from lopsided98/vim-cross-shebang
vim: fix shebangs when cross-compiling
This commit is contained in:
commit
a36554623e
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, callPackage, ncurses, gettext, pkg-config
|
||||
{ lib, stdenv, fetchurl, callPackage, ncurses, bash, gawk, gettext, pkg-config
|
||||
# default vimrc
|
||||
, vimrc ? fetchurl {
|
||||
name = "default-vimrc";
|
||||
@ -18,9 +18,11 @@ stdenv.mkDerivation {
|
||||
inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta;
|
||||
|
||||
nativeBuildInputs = [ gettext pkg-config ];
|
||||
buildInputs = [ ncurses ]
|
||||
buildInputs = [ ncurses bash gawk ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
configureFlags = [
|
||||
"--enable-multibyte"
|
||||
"--enable-nls"
|
||||
@ -36,6 +38,13 @@ stdenv.mkDerivation {
|
||||
"vim_cv_memmove_handles_overlap=yes"
|
||||
];
|
||||
|
||||
# which.sh is used to for vim's own shebang patching, so make it find
|
||||
# binaries for the host platform.
|
||||
preConfigure = ''
|
||||
export HOST_PATH
|
||||
substituteInPlace src/which.sh --replace '$PATH' '$HOST_PATH'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
ln -s $out/bin/vim $out/bin/vi
|
||||
mkdir -p $out/share/vim
|
||||
|
Loading…
Reference in New Issue
Block a user