about summary refs log tree commit diff
path: root/pkgs/applications/editors/vim/configurable.nix
diff options
context:
space:
mode:
authorWilliam Giokas <1007380@gmail.com>2016-01-06 13:52:42 -0600
committerWilliam Giokas <1007380@gmail.com>2016-01-06 14:07:13 -0600
commitc21707ec1fa52895ab47e0c93731a5ddd9e34ce3 (patch)
tree75f2a36fdabe64fd791134b44d3339c63e7e446f /pkgs/applications/editors/vim/configurable.nix
parent222f4b9e2b894f514d9cde60106a4abd39834eb2 (diff)
downloadnixlib-c21707ec1fa52895ab47e0c93731a5ddd9e34ce3.tar
nixlib-c21707ec1fa52895ab47e0c93731a5ddd9e34ce3.tar.gz
nixlib-c21707ec1fa52895ab47e0c93731a5ddd9e34ce3.tar.bz2
nixlib-c21707ec1fa52895ab47e0c93731a5ddd9e34ce3.tar.lz
nixlib-c21707ec1fa52895ab47e0c93731a5ddd9e34ce3.tar.xz
nixlib-c21707ec1fa52895ab47e0c93731a5ddd9e34ce3.tar.zst
nixlib-c21707ec1fa52895ab47e0c93731a5ddd9e34ce3.zip
vim-configurable: Change python versioning
Instead of explicitly stating "I want version 3" or "I want version 2"
you now simply specify what the python argument will be, and
vim_configurable will set up the flags for you. config.vim.python must
be set, still.
Diffstat (limited to 'pkgs/applications/editors/vim/configurable.nix')
-rw-r--r--pkgs/applications/editors/vim/configurable.nix21
1 files changed, 4 insertions, 17 deletions
diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix
index 3d6c9ffa859f..e2715b1499a5 100644
--- a/pkgs/applications/editors/vim/configurable.nix
+++ b/pkgs/applications/editors/vim/configurable.nix
@@ -108,26 +108,14 @@ composableDerivation {
 
       // edf {
         name = "python";
-        feat = "pythoninterp";
+        feat = "python${if python ? isPy3 then "3" else ""}interp";
         enable = {
           nativeBuildInputs = [ python ];
         } // lib.optionalAttrs stdenv.isDarwin {
           configureFlags
-            = [ "--enable-pythoninterp=yes"
-                "--with-python-config-dir=${python}/lib" ];
-        };
-      }
-
-      // edf {
-        name = "python3";
-        feat = "python3interp";
-        enable = {
-          nativeBuildInputs = [ pkgs.python3 ];
-        } // lib.optionalAttrs stdenv.isDarwin {
-          configureFlags
-            = [ "--enable-python3interp=yes"
-                "--with-python3-config-dir=${pkgs.python3}/lib"
-                "--disable-pythoninterp" ];
+            = [ "--enable-python${if python ? isPy3 then "3" else ""}interp=yes"
+                "--with-python${if python ? isPy3 then "3" else ""}-config-dir=${python}/lib"
+                "--disable-python${if python ? isPy3 then "" else "3"}interp" ];
         };
       }
 
@@ -160,7 +148,6 @@ composableDerivation {
   cfg = {
     luaSupport       = config.vim.lua or true;
     pythonSupport    = config.vim.python or true;
-    python3Support   = config.vim.python3 or false;
     rubySupport      = config.vim.ruby or true;
     nlsSupport       = config.vim.nls or false;
     tclSupport       = config.vim.tcl or false;