diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/editors/vim')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/applications/editors/vim/configurable.nix | 15 | ||||
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/applications/editors/vim/macvim.nix | 13 |
2 files changed, 20 insertions, 8 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/editors/vim/configurable.nix b/infra/libkookie/nixpkgs/pkgs/applications/editors/vim/configurable.nix index 77d7ca983cdd..aa8120470d14 100644 --- a/infra/libkookie/nixpkgs/pkgs/applications/editors/vim/configurable.nix +++ b/infra/libkookie/nixpkgs/pkgs/applications/editors/vim/configurable.nix @@ -1,5 +1,5 @@ { source ? "default", callPackage, stdenv, ncurses, pkgconfig, gettext -, writeText, config, glib, gtk2-x11, gtk3-x11, lua, python, perl, tcl, ruby +, writeText, config, glib, gtk2-x11, gtk3-x11, lua, python3, perl, tcl, ruby , libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu , libICE , vimPlugins @@ -62,8 +62,6 @@ let common = callPackage ./common.nix {}; - isPython3 = python.isPy3 or false; - in stdenv.mkDerivation rec { pname = "vim_configurable"; @@ -106,9 +104,10 @@ in stdenv.mkDerivation rec { "--with-luajit" ] ++ stdenv.lib.optionals pythonSupport [ - "--enable-python${if isPython3 then "3" else ""}interp=yes" - "--with-python${if isPython3 then "3" else ""}-config-dir=${python}/lib" - "--disable-python${if (!isPython3) then "3" else ""}interp" + "--enable-python3interp=yes" + "--with-python3-config-dir=${python3}/lib" + # Disables Python 2 + "--disable-pythoninterp" ] ++ stdenv.lib.optional nlsSupport "--enable-nls" ++ stdenv.lib.optional perlSupport "--enable-perlinterp" @@ -134,7 +133,7 @@ in stdenv.mkDerivation rec { ++ stdenv.lib.optional (guiSupport == "gtk3") gtk3-x11 ++ stdenv.lib.optionals darwinSupport [ CoreServices CoreData Cocoa Foundation libobjc ] ++ stdenv.lib.optional luaSupport lua - ++ stdenv.lib.optional pythonSupport python + ++ stdenv.lib.optional pythonSupport python3 ++ stdenv.lib.optional tclSupport tcl ++ stdenv.lib.optional rubySupport ruby; @@ -163,7 +162,7 @@ in stdenv.mkDerivation rec { ln -sfn '${nixosRuntimepath}' "$out"/share/vim/vimrc '' + stdenv.lib.optionalString wrapPythonDrv '' - wrapProgram "$out/bin/vim" --prefix PATH : "${python}/bin" + wrapProgram "$out/bin/vim" --prefix PATH : "${python3}/bin" '' + stdenv.lib.optionalString (guiSupport == "gtk3") '' rewrap () { diff --git a/infra/libkookie/nixpkgs/pkgs/applications/editors/vim/macvim.nix b/infra/libkookie/nixpkgs/pkgs/applications/editors/vim/macvim.nix index ef6c6a144071..d2cc14c30c48 100644 --- a/infra/libkookie/nixpkgs/pkgs/applications/editors/vim/macvim.nix +++ b/infra/libkookie/nixpkgs/pkgs/applications/editors/vim/macvim.nix @@ -94,6 +94,19 @@ stdenv.mkDerivation { + '' unset LD '' + # When building with nix-daemon, we need to pass -derivedDataPath or else it tries to use + # a folder rooted in /var/empty and fails. Unfortunately we can't just pass -derivedDataPath + # by itself as this flag requires the use of -scheme or -xctestrun (not sure why), but MacVim + # by default just runs `xcodebuild -project src/MacVim/MacVim.xcodeproj`, relying on the default + # behavior to build the first target in the project. Experimentally, there seems to be a scheme + # called MacVim, so we'll explicitly select that. We also need to specify the configuration too + # as the scheme seems to have the wrong default. + + '' + configureFlagsArray+=( + XCODEFLAGS="-scheme MacVim -derivedDataPath $NIX_BUILD_TOP/derivedData" + --with-xcodecfg="Release" + ) + '' ; # Because we're building with system clang, this means we're building against Xcode's SDK and |