Skip to content

Commit

Permalink
macvim: Properly link against Nix ncurses
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lilyball committed Sep 28, 2020
1 parent 76dbece commit d3b1d59
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkgs/applications/editors/vim/macvim.nix
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit d3b1d59

Please sign in to comment.