Skip to main content

NixOS

A declarative Linux distribution built on top of the Nix package manager.

Recipes​

Override python package dependencies​

Some python packages come with extra dependencies that are not included in the derivation from nixpkgs. Take shell_gpt for example, it requires litellm to use ollama backend, which can be added with the following override:

(shell_gpt.overrideAttrs (oldAttrs: {
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [ pkgs.python3.pkgs.litellm ];
}))