macvim: disable python support by default

MacVim currently fails to link against nixpkgs python because Xcode's
clang doesn't understand the LLVM bitcode in the
`libpython${pythonVersion}.a` static library. I'm not sure what this
static library is for when `lib/libpython${pythonVersion}.dylib` exists,
but I don't know of a way to tell MacVim to ignore it. Linking against
python works if we rebuild python to skip the static library but that
doesn't seem like a proper solution, so until a permanent solution is
found, just disable python by default.

Also mark macvim as no longer broken.
This commit is contained in:
Lily Ballard
2025-10-23 02:49:57 -07:00
parent f7c3c92c7a
commit c06af958dc
+16 -5
View File
@@ -14,11 +14,12 @@
darwin,
libiconv,
python3,
enablePython ? false,
rcodesign,
}:
let
inherit (lib) optional optionalString;
inherit (lib) optional optionals optionalString;
in
# Try to match MacVim's documented script interface compatibility
@@ -64,8 +65,8 @@ stdenv.mkDerivation (finalAttrs: {
ruby
tcl
perl
python3
];
]
++ optional enablePython python3;
patches = [ ./macvim.patch ];
@@ -77,14 +78,22 @@ stdenv.mkDerivation (finalAttrs: {
"--enable-multibyte"
"--enable-nls"
"--enable-luainterp=dynamic"
]
++ optionals enablePython [
"--enable-python3interp=dynamic"
]
++ [
"--enable-perlinterp=dynamic"
"--enable-rubyinterp=dynamic"
"--enable-tclinterp=yes"
"--without-local-dir"
"--with-luajit"
"--with-lua-prefix=${luajit}"
]
++ optionals enablePython [
"--with-python3-command=${python3}/bin/python3"
]
++ [
"--with-ruby-command=${ruby}/bin/ruby"
"--with-tclsh=${tcl}/bin/tclsh"
"--with-tlib=ncurses"
@@ -204,7 +213,11 @@ stdenv.mkDerivation (finalAttrs: {
libperl=$(dirname $(find ${perl} -name "libperl.dylib"))
install_name_tool -add_rpath ${luajit}/lib $exe
install_name_tool -add_rpath ${tcl}/lib $exe
''
+ optionalString enablePython ''
install_name_tool -add_rpath ${python3}/lib $exe
''
+ ''
install_name_tool -add_rpath $libperl $exe
install_name_tool -add_rpath ${ruby}/lib $exe
@@ -233,8 +246,6 @@ stdenv.mkDerivation (finalAttrs: {
maintainers = [ ];
platforms = platforms.darwin;
hydraPlatforms = [ ]; # hydra can't build this as long as we rely on Xcode and sandboxProfile
# Needs updating to a newer MacVim for Python and Ruby version support
broken = true;
knownVulnerabilities = [
"CVE-2023-46246"
"CVE-2023-48231"