summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/vim
diff options
context:
space:
mode:
authorLily Ballard <lily@sb.org>2020-09-28 15:12:07 -0700
committerLily Ballard <lily@sb.org>2020-09-28 15:12:07 -0700
commitd3b1d59d847c71c525cbc3de45a4da82b15cb318 (patch)
tree3115de52a8c309068722446846de77b9a2aa5907 /pkgs/applications/editors/vim
parent76dbece8e8240a911fcc5722f813a8453f90406f (diff)
macvim: Properly link against Nix ncurses
Since we're not using the Nix compiler, our buildInputs aren't automatically exposed to the compiler, which means it was actually compiling against system libncurses instead of Nix libncurses. Also remove the `-Wno-error` from the make flags (and the unnecessary `PREFIX` definition) in favor of using a much more targeted error suppression at the configure flags. This works around an issue where implicit function definitions are considered an error and the configure script was trying to compile a file tht invoked an ncurses function without including the relevant header.
Diffstat (limited to 'pkgs/applications/editors/vim')
-rw-r--r--pkgs/applications/editors/vim/macvim.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix
index 93ec48e54e0d..1877a196dcd0 100644
--- a/pkgs/applications/editors/vim/macvim.nix
+++ b/pkgs/applications/editors/vim/macvim.nix
@@ -68,8 +68,6 @@ stdenv.mkDerivation {
"--disable-sparkle"
];
- makeFlags = ''PREFIX=$(out) CPPFLAGS="-Wno-error"'';
-
# Remove references to Sparkle.framework from the project.
# It's unused (we disabled it with --disable-sparkle) and this avoids
# copying the unnecessary several-megabyte framework into the result.
@@ -85,7 +83,10 @@ stdenv.mkDerivation {
DEV_DIR=$(/usr/bin/xcode-select -print-path)/Platforms/MacOSX.platform/Developer
configureFlagsArray+=(
- "--with-developer-dir=$DEV_DIR"
+ --with-developer-dir="$DEV_DIR"
+ LDFLAGS="-L${ncurses}/lib"
+ CPPFLAGS="-isystem ${ncurses.dev}/include"
+ CFLAGS="-Wno-error=implicit-function-declaration"
)
''
# For some reason having LD defined causes PSMTabBarControl to fail at link-time as it