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: Change python3 ver setting, add nogui version #7619

Closed
wants to merge 1 commit into from

Conversation

KaiSforza
Copy link
Contributor

Instead of having a specific python3 configuration option, we now just
check the args.python variable passed. This can be trivially set using
stdenv.lib.overrideDerivation.

The nogui part required a bit more changes, completely removing all of
the package requirements in the configurable.nix package, splitting it
all out to the definition in all-packages.nix.

There is a new variable, args.X11, that specifies the build inputs for
building Vim with support for X. On systems where X may not be
available, using the nogui version will set args.X11 to an emply list,
causing none of the X dependencies to be built for Vim. The gui option
is set to "no" in the nogui option, but can be manually overriden with
the overrideDerivation, though then "X11" will have to also be manually
set.

@KaiSforza
Copy link
Contributor Author

Fixes some of the problems I had with #6865, such as being able to specify both python and python3 as enabled.


# optional features by flags
flags = [ "python" "X11" ]; # only flag "X11" by now
});

vim_configurable_nogui = vimUtils.makeCustomizable (callPackage ../applications/editors/vim/configurable.nix {
Copy link
Member

Choose a reason for hiding this comment

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

Can this version use x clipboard?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure, I have yet to test the nogui version in a system that has an X clipboard.

Edit: will be able to test this when I get back to my desk.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it needs the +xterm_clipboard option, which this version does not get built with. Note that mouse selection and such does still work, and you can paste from the X clipboard using the middle mouse button or using the terminal's "paste" operation, if available. The clipboards are just not directly accessible from vim itself.

@KaiSforza
Copy link
Contributor Author

Okay, so this is in super-beta-testing right now, it does dumb things on OSX, and I'm planning to actually just rewrite this whole thing in a much smarter way than it is currently set up.

Instead of having a specific python3 configuration option, we now just
check the args.python variable passed. This can be trivially set using
stdenv.lib.overrideDerivation.

The nogui part required a bit more changes, completely removing all of
the package requirements in the configurable.nix package, splitting it
all out to the definition in all-packages.nix.

There is a new variable, args.X11, that specifies the build inputs for
building Vim with support for X. On systems where X may not be
available, using the nogui version will set args.X11 to an emply list,
causing none of the X dependencies to be built for Vim. The gui option
is set to "no" in the nogui option, but can be manually overriden with
the overrideDerivation, though then "X11" will have to also be manually
set.

There are also facilities to specify your own configure flags and inputs
if desired using the extraFlags and extraInputs arrays. This could let
users enable and disable features as they see fit through overrides and
use platform specific configure flags without adding a maintenance
burden on nixpkgs.
@KaiSforza
Copy link
Contributor Author

Alright, I have changed things around a bit. I was going to go with completely rewriting the edf stuff into simple with statements using arguments to the expression, but the config. stuff was simpler in the long run.

There is also now two new variables you can pass to the vim_configurable expression, extraInputs and extraFlags, for enabling special features via overrides. It will allow users to customise the Vim package even more, without the need to request flags be added to the expression in NixOS/nixpkgs.

@KaiSforza
Copy link
Contributor Author

Note that users will need to know what inputs they require for different flags.

@KaiSforza
Copy link
Contributor Author

Rewriting this because it's pretty crappy. Removed the vim_configurable_nogui bit unless people really want that.

@KaiSforza
Copy link
Contributor Author

See #8125 for a better version of this, minus the nogui stuff. To actually get a package with no xorg stuff requires more than just editing the vim_configurable package, as python/python3 pull in xorg as well.

@KaiSforza KaiSforza closed this Jun 1, 2015
@roberth roberth mentioned this pull request Jan 17, 2023
20 tasks
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