diff --git a/pkgs/applications/editors/vim/macvim-xcode26.patch b/pkgs/applications/editors/vim/macvim-xcode26.patch new file mode 100644 index 000000000000..96a7f0cb397e --- /dev/null +++ b/pkgs/applications/editors/vim/macvim-xcode26.patch @@ -0,0 +1,13 @@ +diff --git a/src/MacVim/MacVim.xcodeproj/project.pbxproj b/src/MacVim/MacVim.xcodeproj/project.pbxproj +index 7481870..6355242 100644 +--- a/src/MacVim/MacVim.xcodeproj/project.pbxproj ++++ b/src/MacVim/MacVim.xcodeproj/project.pbxproj +@@ -1191,7 +1191,7 @@ + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/zsh; +- shellScript = "# Copy the runtime files to the app bundle, under Resources/vim/runtime folder.\n# We cannot do a direct copy of the runtime folder as it contains misc test\n# scripts and also man pages and we should use the Vim's defined rules to\n# install them properly.\n\n# Note that this will also install man pages, under a \"man\" folder. This is\n# useful if the user really wants to point their man page to MacVim's verison\n# instead of builtin Vim, using MANPATH=/Applications/MacVim.app/Contents/man).\n\n# prefix: Reset to empty as it's set to /Applications for fallback rt-folder\n# VIMNAME: Use the default \"vim\" to make sure man pages use that instead of \"Vim\"\n# VIMRTDIR: Make sure to use \"runtime\" as by default it uses a \"vim90\" style folder which is mostly a relic.\n\ncd \"${SRCROOT}\"/..\nmake \\\n DESTDIR=\"${TARGET_BUILD_DIR}\" \\\n prefix= \\\n VIMNAME=vim \\\n VIMRTDIR=/runtime \\\n macvim-install-runtime\n\n# Also add man pages for \"mvim\"\nfor curdir in \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH\"/man/**/man1; do\n (cd $curdir; ln -f -s gvim.1 mvim.1)\ndone\n"; ++ shellScript = "# Copy the runtime files to the app bundle, under Resources/vim/runtime folder.\n# We cannot do a direct copy of the runtime folder as it contains misc test\n# scripts and also man pages and we should use the Vim's defined rules to\n# install them properly.\n\n# Note that this will also install man pages, under a \"man\" folder. This is\n# useful if the user really wants to point their man page to MacVim's verison\n# instead of builtin Vim, using MANPATH=/Applications/MacVim.app/Contents/man).\n\n# prefix: Reset to empty as it's set to /Applications for fallback rt-folder\n# VIMNAME: Use the default \"vim\" to make sure man pages use that instead of \"Vim\"\n# VIMRTDIR: Make sure to use \"runtime\" as by default it uses a \"vim90\" style folder which is mostly a relic.\n\ncd \"${SRCROOT}\"/..\nfor x in ${(k)parameters}; do if [[ $x = *_DEPLOYMENT_TARGET ]]; then [[ $x = MACOSX_DEPLOYMENT_TARGET ]] || unset $x; fi; done\nmake \\\n DESTDIR=\"${TARGET_BUILD_DIR}\" \\\n prefix= \\\n VIMNAME=vim \\\n VIMRTDIR=/runtime \\\n macvim-install-runtime\n\n# Also add man pages for \"mvim\"\nfor curdir in \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH\"/man/**/man1; do\n (cd $curdir; ln -f -s gvim.1 mvim.1)\ndone\n"; + showEnvVarsInLog = 0; + }; + 90C052E1251E889500E2D81E /* Copy vimtutor */ = { diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix index 943fd5b3b29e..91cce5f34de5 100644 --- a/pkgs/applications/editors/vim/macvim.nix +++ b/pkgs/applications/editors/vim/macvim.nix @@ -67,7 +67,13 @@ stdenv.mkDerivation (finalAttrs: { ] ++ optional enablePython python3; - patches = [ ./macvim.patch ]; + patches = [ + ./macvim.patch + # Xcode 26.0 sets *_DEPLOYMENT_TARGET env vars for all platforms in shell script build phases. + # This breaks invocations of clang in those phases, as they target the wrong platform. + # Note: The shell script build phase in question uses /bin/zsh. + ./macvim-xcode26.patch + ]; configureFlags = [ "--enable-cscope" @@ -106,13 +112,6 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' echo "Patching file src/MacVim/MacVim.xcodeproj/project.pbxproj" sed -e '/Sparkle\.framework/d' -i src/MacVim/MacVim.xcodeproj/project.pbxproj - '' - # Xcode 26.0 sets *_DEPLOYMENT_TARGET env vars for all platforms in shell script build phases. - # This breaks invocations of clang in those phases, as they target the wrong platform. - # Note: The shell script build phase in question uses /bin/zsh. - + '' - substituteInPlace src/MacVim/MacVim.xcodeproj/project.pbxproj \ - --replace-fail 'make \' $'for x in ''${(k)parameters}; do if [[ $x = *_DEPLOYMENT_TARGET ]]; then [[ $x = MACOSX_DEPLOYMENT_TARGET ]] || unset $x; fi; done\nmake \\' ''; # This is unfortunate, but we need to use the same compiler as Xcode, but Xcode doesn't provide a diff --git a/pkgs/applications/editors/vim/macvim.patch b/pkgs/applications/editors/vim/macvim.patch index 767c59bd154c..d10c49c40acd 100644 --- a/pkgs/applications/editors/vim/macvim.patch +++ b/pkgs/applications/editors/vim/macvim.patch @@ -51,10 +51,10 @@ index 162af04..4322049 100644 " vim: sw=2 ts=2 et diff --git a/src/Makefile b/src/Makefile -index 5b4cdff..72fee3a 100644 +index d89756f..184354d 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -1290,7 +1290,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \ +@@ -1293,7 +1293,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \ MacVim/MacVim.m MACVIMGUI_OBJ = objects/gui.o objects/gui_beval.o \ objects/gui_macvim.o objects/MMBackend.o objects/MacVim.o @@ -64,10 +64,10 @@ index 5b4cdff..72fee3a 100644 MACVIMGUI_LIBS_DIR = MACVIMGUI_LIBS1 = diff --git a/src/auto/configure b/src/auto/configure -index ecf10c4..4b691d0 100755 +index d4ead96..299988f 100755 --- a/src/auto/configure +++ b/src/auto/configure -@@ -6247,10 +6247,7 @@ printf "%s\n" "not found" >&6; } +@@ -6288,10 +6288,7 @@ printf "%s\n" "not found" >&6; } for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do if test "X$path" != "X"; then @@ -79,7 +79,7 @@ index ecf10c4..4b691d0 100755 MZSCHEME_LIBS="${path}/libmzscheme3m.a" MZSCHEME_CFLAGS="-DMZ_PRECISE_GC" elif test -f "${path}/libracket3m.a"; then -@@ -6646,23 +6643,6 @@ printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; } +@@ -6720,23 +6717,6 @@ printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; } fi if test "x$MACOS_X" = "xyes"; then @@ -103,7 +103,7 @@ index ecf10c4..4b691d0 100755 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` fi -@@ -6902,13 +6882,7 @@ __: +@@ -6976,13 +6956,7 @@ __: eof eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" rm -f -- "${tmp_mkf}" @@ -118,7 +118,7 @@ index ecf10c4..4b691d0 100755 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'` -@@ -6923,7 +6897,6 @@ eof +@@ -6997,7 +6971,6 @@ eof fi vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}" vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//` @@ -126,7 +126,7 @@ index ecf10c4..4b691d0 100755 fi -@@ -7004,13 +6977,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ +@@ -7078,13 +7051,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ printf "%s\n" "no" >&6; } fi @@ -140,7 +140,7 @@ index ecf10c4..4b691d0 100755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5 printf %s "checking if compile and link flags for Python are sane... " >&6; } cflags_save=$CFLAGS -@@ -8060,11 +8026,7 @@ printf "%s\n" "$tclver - OK" >&6; }; +@@ -8141,11 +8107,7 @@ printf "%s\n" "$tclver - OK" >&6; }; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5 printf %s "checking for location of Tcl include... " >&6; } @@ -152,7 +152,7 @@ index ecf10c4..4b691d0 100755 TCL_INC= for try in $tclinc; do if test -f "$try/tcl.h"; then -@@ -8082,13 +8044,8 @@ printf "%s\n" "" >&6; } +@@ -8163,13 +8125,8 @@ printf "%s\n" "" >&6; } if test -z "$SKIP_TCL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5 printf %s "checking for location of tclConfig.sh script... " >&6; } @@ -166,9 +166,9 @@ index ecf10c4..4b691d0 100755 for try in $tclcnf; do if test -f "$try/tclConfig.sh"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5 -@@ -8285,10 +8242,6 @@ printf "%s\n" "$rubyhdrdir" >&6; } +@@ -8366,10 +8323,6 @@ printf "%s\n" "$rubyhdrdir" >&6; } rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"` - if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby"; then + if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby" >/dev/null; then RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" - elif test "$vi_cv_path_ruby" = "/usr/bin/ruby" -a -d "/System/Library/Frameworks/Ruby.framework"; then - RUBY_LIBS="-framework Ruby" @@ -178,10 +178,10 @@ index ecf10c4..4b691d0 100755 if test "X$librubyarg" != "X"; then diff --git a/src/vim.h b/src/vim.h -index 6e33142..6185f45 100644 +index feaa685..fe34d99 100644 --- a/src/vim.h +++ b/src/vim.h -@@ -270,17 +270,6 @@ +@@ -277,17 +277,6 @@ # define SUN_SYSTEM #endif