Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim_configurable: change python version detection #8125

Merged
merged 1 commit into from Jan 6, 2016

Conversation

KaiSforza
Copy link
Contributor

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.

This is a complete rewrite of the PR I submitted in June 2015.

(Branch name is a bit of a misnomer, but that's the name of the package I use to test.)

@KaiSforza
Copy link
Contributor Author

A better solution than #7619

@jagajaga
Copy link
Member

jagajaga commented Jun 2, 2015

cc me

@KaiSforza
Copy link
Contributor Author

Any input on this?

[ ./python_framework.patch ];

configureFlags
= [ "--enable-gui=${args.gui}" "--with-features=${args.features}" ];

nativeBuildInputs
= [ ncurses pkgconfig gtk libX11 libXext libSM libXpm libXt libXaw libXau
libXmu glib libICE ];
= if args.gui != "no" then [ ncurses pkgconfig gtk libX11 libXext libSM libXpm libXt libXaw libXau
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can take out ncurses pkgconfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From both?

@KaiSforza
Copy link
Contributor Author

Complete rewrite, much simpler, no changes to X.

The python3 specific stuff (python3Support, etc) was removed entirely, in favor of a simple if/else statement using python ? isPy3.

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.
@KaiSforza
Copy link
Contributor Author

Pinging @jagajaga.

@jagajaga
Copy link
Member

jagajaga commented Jan 6, 2016

Hmm. What does this statement do?

@KaiSforza
Copy link
Contributor Author

places a 3 if python ? isPy3 returns true, otherwise leaves it blank. It then does the opposite for the --disable flag (at least in darwin).

@KaiSforza
Copy link
Contributor Author

The ? isPy3 means that it will return false if that attribute is not set:

nix-repl> python ? isPy3
false

nix-repl> python3 ? isPy3
true

@jagajaga
Copy link
Member

jagajaga commented Jan 6, 2016

So to enable python 3 we need to override pkg with python = python3?

@KaiSforza
Copy link
Contributor Author

Yes. Changing the python input will change what the package enables or disables.

jagajaga added a commit that referenced this pull request Jan 6, 2016
vim_configurable: change python version detection
@jagajaga jagajaga merged commit 9d30688 into NixOS:master Jan 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants