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

neovim: added custom aliases #54476

Closed
wants to merge 1 commit into from
Closed

neovim: added custom aliases #54476

wants to merge 1 commit into from

Conversation

BananchickPasha
Copy link
Contributor

Motivation for this change

Some people would like to use custom alias for neovim, not just vi or vim.
Also, i want to use many builds of neovim at the same time, so i need symlink for this.

Things done

I've just added three lines of code which are similar to those already written.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -90,6 +91,8 @@ let
ln -s $out/bin/nvim $out/bin/vim
'' + optionalString viAlias ''
ln -s $out/bin/nvim $out/bin/vi
'' + optionalString (customAlias != "") ''
ln -s $out/bin/nvim $out/bin/${customAlias}
Copy link
Member

@Mic92 Mic92 Jan 22, 2019

Choose a reason for hiding this comment

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

Thanks for your contribution.
I don't think we need this as an explicit option.
It can be easily replicated like this:

environment.systemPackages = [
  (runCommand "vim-alias" {} ''
    mkdir $out/bin
    ln -s ${pkgs.nvim}/bin/vim $out/bin/youralias
  '')
];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I didn't know about this feature. Sorry of wasting your time on useless pull request.

@Mic92
Copy link
Member

Mic92 commented Jan 23, 2019

No worries. I just try to avoid to add too many knobs/build-options because they make the portion of code that is not tested regulary larger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants