tmux-nova
tmux-nova copied to clipboard
Add to Nix tmux-plugins pkg
Would be awesome if we can get it added here 🙏
https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/tmux-plugins/default.nix
Hi @donferi, unfortunately, I'm not familiar with NixOS. What are the steps to follow to make it available there?
Hey @donferi I have the plugin imported as a package for NixOS! https://github.com/NovaViper/NixConfig/blob/main/pkgs/tmux-plugins/nova/default.nix
I made a custom package for it in my flake and I have it overlayed into my nixpkgs so I can install it like any other tmux plugin with Home-Manager's programs.tmux.plugins = with pkgs.tmuxPlugins; [ nova ];
@o0th Like my in my previous comment, you have to 'declare' it as how the other plugins are in the nixpkg repo, which would match like mine in my flake. Fornately, it's not too complicated to do this for the plugin since Nix has a special package wrapper (tmuxPlugins.mkTmuxPlugin
) for Tmux plugins, and it only requires the owner
(owner of the Github repo), repo
(the repo's name), rev
(current or any specified commit revision), and hash
(the commit's hash). When you specify that, it will go ahead and actually build the package for you!
What's neat about NixOS (and Nix overall) is that it lets you retrieve Github repos at its current commit revision (but it requires the hash to verify that it got the correct commit); hence building the packages from source essentially. How you get the rev
and hash
is simply using nix-prefetch-github
, which is a Nix specific tool used to get the requested Github repo's current commit revision and its hash. Users can do the overlay technique like how I did, and they wouldn't have to use flakes to do this, but I found it easier to setup my NixOS config as a flake. Now for it to be accessed without requiring users to overlay it, it would have to be published onto the nixpkgs repo; which hosts every single NixOS package.
This is the basics of how it works afaik; it's something I got working on my end. Hopefully it helps, sorry if I missed anything (I'm actually a recent convert to NixOS so I'm still learning about it 😄 ).
Hi @NovaViper! Thank you for using my plugin! I did open a PR for it. Hope is fine NixOS/nixpkgs#316457
@donferi @o0th Hey the plugin's on NixOS (unstable branch) now! The issue can now be closed as completed :)
Thank you @NovaViper for the help :)
@o0th No problem!! Glad I could help 👍🏾