mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-24 00:25:50 -06:00
centralize package versions to make it simpler to update them
This commit is contained in:
parent
927879b475
commit
d5b00e93ec
6 changed files with 82 additions and 20 deletions
|
@ -1,3 +1,8 @@
|
|||
{
|
||||
version,
|
||||
hash,
|
||||
}:
|
||||
|
||||
{
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
@ -11,16 +16,16 @@
|
|||
...
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage {
|
||||
inherit version;
|
||||
pname = "llm-anthropic";
|
||||
version = "0.12";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "simonw";
|
||||
repo = "llm-anthropic";
|
||||
rev = version;
|
||||
hash = "sha256-7+5j5jZBFfaaqnfjvLTI+mz1PUuG8sB5nD59UCpJuR4=";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{ version, hash }:
|
||||
{
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
@ -12,16 +13,16 @@
|
|||
...
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage {
|
||||
inherit version;
|
||||
pname = "llm-cmd";
|
||||
version = "0.2a0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "simonw";
|
||||
repo = "llm-cmd";
|
||||
rev = version;
|
||||
hash = "sha256-RhwQEllpee/XP1p0nrgL4m+KjSZzf61J8l1jJGlg94E=";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{ version, hash }:
|
||||
{
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
@ -12,16 +13,16 @@
|
|||
...
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage {
|
||||
inherit version;
|
||||
pname = "llm-gemini";
|
||||
version = "0.10";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "simonw";
|
||||
repo = "llm-gemini";
|
||||
rev = version;
|
||||
hash = "sha256-+ghsBvEY8GQAphdvG7Rdu3T/7yz64vmkuA1VGvqw1fU=";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{ version, hash }:
|
||||
{
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
@ -9,16 +10,17 @@
|
|||
...
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage {
|
||||
inherit version;
|
||||
pname = "llm-jq";
|
||||
version = "0.1.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "simonw";
|
||||
repo = "llm-jq";
|
||||
rev = version;
|
||||
hash = "sha256-Mf/tbB9+UdmSRpulqv5Wagr8wjDcRrNs2741DNQZhO4=";
|
||||
inherit hash;
|
||||
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
33
pkgs/llm/llm-python/default.nix
Normal file
33
pkgs/llm/llm-python/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ version, hash }:
|
||||
{
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
wheel,
|
||||
|
||||
...
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
inherit version;
|
||||
pname = "llm-python";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "simonw";
|
||||
repo = "llm-python";
|
||||
rev = version;
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
|
||||
dependencies = [ ];
|
||||
|
||||
dontCheckRuntimeDeps = true;
|
||||
}
|
|
@ -3,16 +3,36 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (builtins) mapAttrs attrValues;
|
||||
inherit (pkgs) python3Packages;
|
||||
llm = python3Packages.callPackage ../llm { };
|
||||
plugins = [
|
||||
"anthropic"
|
||||
"gemini"
|
||||
"cmd"
|
||||
"jq"
|
||||
];
|
||||
mkPlugin = name: attrs: python3Packages.callPackage (import (../. + "/llm-${name}") attrs) { };
|
||||
|
||||
pluginPackages = plugins |> map (name: python3Packages.callPackage (../. + "/llm-${name}") { });
|
||||
llm = python3Packages.callPackage ../llm { };
|
||||
|
||||
pluginAttr = {
|
||||
anthropic = {
|
||||
version = "0.12";
|
||||
hash = "sha256-7+5j5jZBFfaaqnfjvLTI+mz1PUuG8sB5nD59UCpJuR4=";
|
||||
};
|
||||
gemini = {
|
||||
version = "0.10";
|
||||
hash = "sha256-+ghsBvEY8GQAphdvG7Rdu3T/7yz64vmkuA1VGvqw1fU=";
|
||||
};
|
||||
cmd = {
|
||||
version = "0.2a0";
|
||||
hash = "sha256-RhwQEllpee/XP1p0nrgL4m+KjSZzf61J8l1jJGlg94E=";
|
||||
};
|
||||
jq = {
|
||||
version = "0.1.1";
|
||||
hash = "sha256-Mf/tbB9+UdmSRpulqv5Wagr8wjDcRrNs2741DNQZhO4=";
|
||||
};
|
||||
python = {
|
||||
version = "0.1";
|
||||
hash = "sha256-Z991f0AGO5iaCeoG9dkFhTLtuR45PgCS9awCvOAuPPs=";
|
||||
};
|
||||
};
|
||||
|
||||
pluginPackages = pluginAttr |> mapAttrs mkPlugin |> attrValues;
|
||||
|
||||
pyWithLlm = (
|
||||
pkgs.python3.withPackages (
|
||||
|
|
Loading…
Add table
Reference in a new issue