fish-ai
fish-ai copied to clipboard
feat: Installation instructions for Nix users
💡 Summary
Provide instuctions on how this plugin could be installed using the Nix package manager.
🗨 Details
One is able to fetch the plugin with instructions provided in the NixOS wiki, but not run any of the following steps (probably an isntallation using python is involved?).
I'm not very familiar with NixOS. What does your configuration.nix file look like at the moment?
You should be able to fetch the plugin from GitHub using:
{
name = "fish-ai";
src = pkgs.fetchFromGitHub {
owner = "realiserad";
repo = "fish-ai";
rev = "v1.8.0";
sha256 = "03ja4q30br68vsa02772vb4m7warjyd32w57mzqipxssr16h0b2b";
};
}
After Nix has copied over the relevant files, you should be able to manually set it up by invoking _fish_ai_install. This function will set up a Python virtual environment for the plugin, so here you need Python with virtualenv and pip.
You also need fisher to make it work. First of all Download home-manager if you don't have.
And install fisher and fish-ai with:
{ pkgs, ... }:
{
programs.fish = {
enable = true;
plugins = [
{
name = "fisher";
src = pkgs.fetchFromGithub {
owner = "jorgebucaran";
repo = "fisher";
rev = "1f0dc2b4970da160605638cb0f157079660d6e04";
hash = "sha256-pR5RKU+zIb7CS0Y6vjx2QIZ8Iu/3ojRfAcAdjCOxl1U=";
};
}
{
name = "fish-ai";
src = pkgs.fetchFromGithub {
owner = "realiserad";
repo = "fish-ai";
rev = "0ny0vi6wh0q70kfim0qhcyrwmrvfb9wq04d1phwjjvgpqkznwfpl";
hash = "sha256-9Dpu/8T3bSk5vKERgHlabufKs2cQgxrdBAcDyE3cwFs=";
};
}
];
};
}
And install following packages:
environment.systemPackages = with pkgs; [
python3
python3Packages.pip
# Already Installed by system (add them if in case of some curl or grep error)
curl
gnutar
gnugrep
gzip
];
hash and rev values might be changed because of new releases and these are the hash and rev values of the current versions. To check for new releases install nix-prefetch-git.
And run this for fisher:
nix-prefetch-git https://github.com/jorgebucaran/fisher
And this for fish-ai:
nix-prefetch-git https://github.com/realiserad/fish-ai