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.

+4 -3
+4 -3
pkgs/applications/editors/vim/macvim.nix
··· 68 68 "--disable-sparkle" 69 69 ]; 70 70 71 - makeFlags = ''PREFIX=$(out) CPPFLAGS="-Wno-error"''; 72 - 73 71 # Remove references to Sparkle.framework from the project. 74 72 # It's unused (we disabled it with --disable-sparkle) and this avoids 75 73 # copying the unnecessary several-megabyte framework into the result. ··· 85 83 86 84 DEV_DIR=$(/usr/bin/xcode-select -print-path)/Platforms/MacOSX.platform/Developer 87 85 configureFlagsArray+=( 88 - "--with-developer-dir=$DEV_DIR" 86 + --with-developer-dir="$DEV_DIR" 87 + LDFLAGS="-L${ncurses}/lib" 88 + CPPFLAGS="-isystem ${ncurses.dev}/include" 89 + CFLAGS="-Wno-error=implicit-function-declaration" 89 90 ) 90 91 '' 91 92 # For some reason having LD defined causes PSMTabBarControl to fail at link-time as it