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
Conversation
Fixes some of the problems I had with #6865, such as being able to specify both |
|
||
# optional features by flags | ||
flags = [ "python" "X11" ]; # only flag "X11" by now | ||
}); | ||
|
||
vim_configurable_nogui = vimUtils.makeCustomizable (callPackage ../applications/editors/vim/configurable.nix { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.
Alright, I have changed things around a bit. I was going to go with completely rewriting the There is also now two new variables you can pass to the |
Note that users will need to know what inputs they require for different flags. |
Rewriting this because it's pretty crappy. Removed the vim_configurable_nogui bit unless people really want that. |
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. |
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.