Merge pull request #102472 from helsinki-systems/feat/vim-python3
vim: Get rid of Python 2 dependency
This commit is contained in:
commit
3497b757d3
2 changed files with 12 additions and 8 deletions
|
@ -146,6 +146,11 @@
|
||||||
<link xlink:href="http://www.mutt.org/relnotes/2.0/">release notes for Mutt 2.0</link>.
|
<link xlink:href="http://www.mutt.org/relnotes/2.0/">release notes for Mutt 2.0</link>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>vim</literal> switched to Python 3, dropping all Python 2 support.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ source ? "default", callPackage, stdenv, ncurses, pkgconfig, gettext
|
{ 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
|
, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
|
||||||
, libICE
|
, libICE
|
||||||
, vimPlugins
|
, vimPlugins
|
||||||
|
@ -62,8 +62,6 @@ let
|
||||||
|
|
||||||
common = callPackage ./common.nix {};
|
common = callPackage ./common.nix {};
|
||||||
|
|
||||||
isPython3 = python.isPy3 or false;
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
pname = "vim_configurable";
|
pname = "vim_configurable";
|
||||||
|
@ -106,9 +104,10 @@ in stdenv.mkDerivation rec {
|
||||||
"--with-luajit"
|
"--with-luajit"
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optionals pythonSupport [
|
++ stdenv.lib.optionals pythonSupport [
|
||||||
"--enable-python${if isPython3 then "3" else ""}interp=yes"
|
"--enable-python3interp=yes"
|
||||||
"--with-python${if isPython3 then "3" else ""}-config-dir=${python}/lib"
|
"--with-python3-config-dir=${python3}/lib"
|
||||||
"--disable-python${if (!isPython3) then "3" else ""}interp"
|
# Disables Python 2
|
||||||
|
"--disable-pythoninterp"
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optional nlsSupport "--enable-nls"
|
++ stdenv.lib.optional nlsSupport "--enable-nls"
|
||||||
++ stdenv.lib.optional perlSupport "--enable-perlinterp"
|
++ stdenv.lib.optional perlSupport "--enable-perlinterp"
|
||||||
|
@ -134,7 +133,7 @@ in stdenv.mkDerivation rec {
|
||||||
++ stdenv.lib.optional (guiSupport == "gtk3") gtk3-x11
|
++ stdenv.lib.optional (guiSupport == "gtk3") gtk3-x11
|
||||||
++ stdenv.lib.optionals darwinSupport [ CoreServices CoreData Cocoa Foundation libobjc ]
|
++ stdenv.lib.optionals darwinSupport [ CoreServices CoreData Cocoa Foundation libobjc ]
|
||||||
++ stdenv.lib.optional luaSupport lua
|
++ stdenv.lib.optional luaSupport lua
|
||||||
++ stdenv.lib.optional pythonSupport python
|
++ stdenv.lib.optional pythonSupport python3
|
||||||
++ stdenv.lib.optional tclSupport tcl
|
++ stdenv.lib.optional tclSupport tcl
|
||||||
++ stdenv.lib.optional rubySupport ruby;
|
++ stdenv.lib.optional rubySupport ruby;
|
||||||
|
|
||||||
|
@ -163,7 +162,7 @@ in stdenv.mkDerivation rec {
|
||||||
|
|
||||||
ln -sfn '${nixosRuntimepath}' "$out"/share/vim/vimrc
|
ln -sfn '${nixosRuntimepath}' "$out"/share/vim/vimrc
|
||||||
'' + stdenv.lib.optionalString wrapPythonDrv ''
|
'' + 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") ''
|
'' + stdenv.lib.optionalString (guiSupport == "gtk3") ''
|
||||||
|
|
||||||
rewrap () {
|
rewrap () {
|
||||||
|
|
Loading…
Reference in a new issue