diff --git a/pkgs/default.nix b/pkgs/default.nix index aac7e2d..3456a48 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,7 +1,4 @@ { pkgs, ... }: -let - inherit (pkgs) python3Packages; -in { nimlangserver = pkgs.callPackage ./nim/nimlangserver { }; procs = pkgs.callPackage ./nim/procs { }; @@ -9,6 +6,6 @@ in distrobox = pkgs.callPackage ./distrobox { }; - llm = python3Packages.callPackage ./llm { }; - llm-claude-3 = python3Packages.callPackage ./llm-plugins/llm-claude-3 { }; + llm-with-plugins = pkgs.callPackage ./llm/llm-with-plugins {}; } + diff --git a/pkgs/llm-plugins/llm-claude-3/default.nix b/pkgs/llm/llm-claude-3/default.nix similarity index 100% rename from pkgs/llm-plugins/llm-claude-3/default.nix rename to pkgs/llm/llm-claude-3/default.nix diff --git a/pkgs/llm-plugins/llm-ollama/default.nix b/pkgs/llm/llm-ollama/default.nix similarity index 100% rename from pkgs/llm-plugins/llm-ollama/default.nix rename to pkgs/llm/llm-ollama/default.nix diff --git a/pkgs/llm/llm-with-plugins/default.nix b/pkgs/llm/llm-with-plugins/default.nix new file mode 100644 index 0000000..4e93188 --- /dev/null +++ b/pkgs/llm/llm-with-plugins/default.nix @@ -0,0 +1,19 @@ +{ + pkgs, + ... +}: +let + inherit (pkgs) python3Packages; + llm = python3Packages.callPackage ../llm { }; + llm-claude-3 = python3Packages.callPackage ../llm-plugins/llm-claude-3 { }; + + pyWithLlm = ( + pkgs.python3.withPackages (_: [ + llm + llm-claude-3 + ]) + ); +in +pkgs.writeShellScriptBin "llm" '' + exec ${pyWithLlm}/bin/llm "$@" +'' diff --git a/pkgs/llm/default.nix b/pkgs/llm/llm/default.nix similarity index 100% rename from pkgs/llm/default.nix rename to pkgs/llm/llm/default.nix