git.iko.soy/typeable/nixpkgs
on master help sign in
vim: Get rid of Python 2 dependency
commit576a9287941b279fff9684013266bf89aeb68a02 authorJanne Heß <janne@hess.ooo> dateMon 2 Nov 2020, 12:26 (6 years ago) parent00ecee0
2 files changed+12−8
nixos/doc/manual/release-notes/rl-2103.xml+5 pkgs/applications/editors/vim/configurable.nix+7−8
nixos/doc/manual/release-notes/rl-2103.xml+5
@@ -143,6 +143,11 @@
143143 <link xlink:href="http://www.mutt.org/relnotes/2.0/">release notes for Mutt 2.0</link>.
144144 </para>
145145 </listitem>
146+ <listitem>
147+ <para>
148+ <literal>vim</literal> switched to Python 3, dropping all Python 2 support.
149+ </para>
150+ </listitem>
146151 </itemizedlist>
147152 </section>
148153
pkgs/applications/editors/vim/configurable.nix+7−8
@@ -1,5 +1,5 @@
11{ source ? "default", callPackage, stdenv, ncurses, pkgconfig, gettext
2−, writeText, config, glib, gtk2-x11, gtk3-x11, lua, python, perl, tcl, ruby
2+, writeText, config, glib, gtk2-x11, gtk3-x11, lua, python3, perl, tcl, ruby
33, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
44, libICE
55, vimPlugins
@@ -62,8 +62,6 @@ let
6262
6363 common = callPackage ./common.nix {};
6464
65− isPython3 = python.isPy3 or false;
66−
6765in stdenv.mkDerivation rec {
6866
6967 pname = "vim_configurable";
@@ -106,9 +104,10 @@ in stdenv.mkDerivation rec {
106104 "--with-luajit"
107105 ]
108106 ++ stdenv.lib.optionals pythonSupport [
109− "--enable-python${if isPython3 then "3" else ""}interp=yes"
110− "--with-python${if isPython3 then "3" else ""}-config-dir=${python}/lib"
111− "--disable-python${if (!isPython3) then "3" else ""}interp"
107+ "--enable-python3interp=yes"
108+ "--with-python3-config-dir=${python3}/lib"
109+ # Disables Python 2
110+ "--disable-pythoninterp"
112111 ]
113112 ++ stdenv.lib.optional nlsSupport "--enable-nls"
114113 ++ stdenv.lib.optional perlSupport "--enable-perlinterp"
@@ -134,7 +133,7 @@ in stdenv.mkDerivation rec {
134133 ++ stdenv.lib.optional (guiSupport == "gtk3") gtk3-x11
135134 ++ stdenv.lib.optionals darwinSupport [ CoreServices CoreData Cocoa Foundation libobjc ]
136135 ++ stdenv.lib.optional luaSupport lua
137− ++ stdenv.lib.optional pythonSupport python
136+ ++ stdenv.lib.optional pythonSupport python3
138137 ++ stdenv.lib.optional tclSupport tcl
139138 ++ stdenv.lib.optional rubySupport ruby;
140139
@@ -163,7 +162,7 @@ in stdenv.mkDerivation rec {
163162
164163 ln -sfn '${nixosRuntimepath}' "$out"/share/vim/vimrc
165164 '' + stdenv.lib.optionalString wrapPythonDrv ''
166− wrapProgram "$out/bin/vim" --prefix PATH : "${python}/bin"
165+ wrapProgram "$out/bin/vim" --prefix PATH : "${python3}/bin"
167166 '' + stdenv.lib.optionalString (guiSupport == "gtk3") ''
168167
169168 rewrap () {