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.
This commit is contained in:
Lily Ballard 2020-09-28 15:12:07 -07:00
parent 76dbece8e8
commit d3b1d59d84

View File

@ -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