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: set meta.mainProgram #120662

Merged
merged 1 commit into from Apr 26, 2021
Merged

Conversation

Hoverbear
Copy link
Member

@Hoverbear Hoverbear commented Apr 25, 2021

Motivation for this change

Neovim's main executable is nvim. When running commands such as nix run nixpkgs#neovim users receive and error like:

$ nix run nixpkgs#neovim
error: unable to execute '/nix/store/j03scl0i8da1f2rlfaqdcpz8awzh0agk-neovim-0.4.4/bin/neovim': No such file or directory

After this patch, users experience nvim launching:

$ nix run .#neovim
# nvim opens!
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Hoverbear Hoverbear requested a review from teto as a code owner April 25, 2021 23:14
@grahamc
Copy link
Member

grahamc commented Apr 25, 2021

Looks like a great idea. This will need a minor change to our meta validation code:

description = str;

adding a new field named mainProgram of the type str.

@Hoverbear
Copy link
Member Author

Hoverbear commented Apr 26, 2021

@grahamc Thanks for this advice! I introduced a PR doing that in #120692.

While it's in a separate PR as well, this requires it, so I've rebased this PR on top.

Signed-off-by: Ana Hobden <operator@hoverbear.org>
@github-actions github-actions bot removed the 6.topic: stdenv Standard environment label Apr 26, 2021
@grahamc grahamc merged commit d01c15e into NixOS:master Apr 26, 2021
@legendofmiracles legendofmiracles mentioned this pull request Apr 27, 2021
10 tasks
@Hoverbear Hoverbear mentioned this pull request Apr 27, 2021
10 tasks
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

2 participants