Fix MacVim by using clang.

+41 -6
+7 -5
pkgs/applications/editors/vim/macvim.nix
··· 1 - { stdenv, stdenvAdapters, gccApple, fetchFromGitHub, ncurses, gettext, 2 pkgconfig, cscope, python, ruby, tcl, perl, luajit 3 }: 4 5 - let inherit (stdenvAdapters.overrideGCC stdenv gccApple) mkDerivation; 6 - in mkDerivation rec { 7 name = "macvim-${version}"; 8 9 - version = "7.4.355"; 10 11 src = fetchFromGitHub { 12 owner = "genoma"; 13 repo = "macvim"; 14 - rev = "c18a61f9723565664ffc2eda9179e96c95860e25"; 15 sha256 = "190bngg8m4bwqcia7w24gn7mmqkhk0mavxy81ziwysam1f652ymf"; 16 }; 17 ··· 46 "--enable-perlinterp=dynamic" 47 "--enable-rubyinterp=dynamic" 48 "--enable-tclinterp=yes" 49 "--with-luajit" 50 "--with-lua-prefix=${luajit}" 51 "--with-ruby-command=${ruby}/bin/ruby" ··· 53 "--with-tlib=ncurses" 54 "--with-compiledby=Nix" 55 ]; 56 57 preConfigure = '' 58 DEV_DIR=$(/usr/bin/xcode-select -print-path)/Platforms/MacOSX.platform/Developer
··· 1 + { stdenv, fetchFromGitHub, ncurses, gettext, 2 pkgconfig, cscope, python, ruby, tcl, perl, luajit 3 }: 4 5 + stdenv.mkDerivation rec { 6 name = "macvim-${version}"; 7 8 + version = "7.4.479"; 9 10 src = fetchFromGitHub { 11 owner = "genoma"; 12 repo = "macvim"; 13 + rev = "f9c084b97fa9d5cad2448dfd3eff3d9b7f0fac59"; 14 sha256 = "190bngg8m4bwqcia7w24gn7mmqkhk0mavxy81ziwysam1f652ymf"; 15 }; 16 ··· 45 "--enable-perlinterp=dynamic" 46 "--enable-rubyinterp=dynamic" 47 "--enable-tclinterp=yes" 48 + "--without-local-dir" 49 "--with-luajit" 50 "--with-lua-prefix=${luajit}" 51 "--with-ruby-command=${ruby}/bin/ruby" ··· 53 "--with-tlib=ncurses" 54 "--with-compiledby=Nix" 55 ]; 56 + 57 + makeFlags = ''PREFIX=$(out) CPPFLAGS="-Wno-error"''; 58 59 preConfigure = '' 60 DEV_DIR=$(/usr/bin/xcode-select -print-path)/Platforms/MacOSX.platform/Developer
+33
pkgs/applications/editors/vim/macvim.patch
··· 187 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 188 # would make configure fail if this is the last instruction. 189 $ac_cs_success || as_fn_exit 1
··· 187 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 188 # would make configure fail if this is the last instruction. 189 $ac_cs_success || as_fn_exit 1 190 + 191 + diff --git a/src/Makefile b/src/Makefile 192 + index 1c4d104..fff2015 100644 193 + --- a/src/Makefile 194 + +++ b/src/Makefile 195 + @@ -1298,7 +1298,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \ 196 + MacVim/MacVim.m 197 + MACVIMGUI_OBJ = objects/gui.o objects/gui_beval.o objects/pty.o \ 198 + objects/gui_macvim.o objects/MMBackend.o objects/MacVim.o 199 + -MACVIMGUI_DEFS = -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe 200 + +MACVIMGUI_DEFS = -DMACOS_X_UNIX -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe 201 + MACVIMGUI_IPATH = 202 + MACVIMGUI_LIBS_DIR = 203 + MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon 204 + 205 + diff --git a/src/if_python.c b/src/if_python.c 206 + index b356bf7..b7bfa78 100644 207 + --- a/src/if_python.c 208 + +++ b/src/if_python.c 209 + @@ -55,11 +55,7 @@ 210 + 211 + #define PY_SSIZE_T_CLEAN 212 + 213 + -#ifdef FEAT_GUI_MACVIM 214 + -# include <Python/Python.h> 215 + -#else 216 + -# include <Python.h> 217 + -#endif 218 + +#include <Python.h> 219 + 220 + #if !defined(PY_VERSION_HEX) || PY_VERSION_HEX < 0x02050000 221 + # undef PY_SSIZE_T_CLEAN 222 + MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon
+1 -1
pkgs/top-level/all-packages.nix
··· 10504 10505 vim = callPackage ../applications/editors/vim { }; 10506 10507 - macvim = callPackage ../applications/editors/vim/macvim.nix { }; 10508 10509 vimHugeX = vim_configurable; 10510
··· 10504 10505 vim = callPackage ../applications/editors/vim { }; 10506 10507 + macvim = callPackage ../applications/editors/vim/macvim.nix { stdenv = clangStdenv; }; 10508 10509 vimHugeX = vim_configurable; 10510