mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-24 04:35:49 -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,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
@ -11,16 +16,16 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage {
|
||||||
|
inherit version;
|
||||||
pname = "llm-anthropic";
|
pname = "llm-anthropic";
|
||||||
version = "0.12";
|
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "simonw";
|
owner = "simonw";
|
||||||
repo = "llm-anthropic";
|
repo = "llm-anthropic";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-7+5j5jZBFfaaqnfjvLTI+mz1PUuG8sB5nD59UCpJuR4=";
|
inherit hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{ version, hash }:
|
||||||
{
|
{
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
@ -12,16 +13,16 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage {
|
||||||
|
inherit version;
|
||||||
pname = "llm-cmd";
|
pname = "llm-cmd";
|
||||||
version = "0.2a0";
|
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "simonw";
|
owner = "simonw";
|
||||||
repo = "llm-cmd";
|
repo = "llm-cmd";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-RhwQEllpee/XP1p0nrgL4m+KjSZzf61J8l1jJGlg94E=";
|
inherit hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{ version, hash }:
|
||||||
{
|
{
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
@ -12,16 +13,16 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage {
|
||||||
|
inherit version;
|
||||||
pname = "llm-gemini";
|
pname = "llm-gemini";
|
||||||
version = "0.10";
|
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "simonw";
|
owner = "simonw";
|
||||||
repo = "llm-gemini";
|
repo = "llm-gemini";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-+ghsBvEY8GQAphdvG7Rdu3T/7yz64vmkuA1VGvqw1fU=";
|
inherit hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{ version, hash }:
|
||||||
{
|
{
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
@ -9,16 +10,17 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage {
|
||||||
|
inherit version;
|
||||||
pname = "llm-jq";
|
pname = "llm-jq";
|
||||||
version = "0.1.1";
|
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "simonw";
|
owner = "simonw";
|
||||||
repo = "llm-jq";
|
repo = "llm-jq";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-Mf/tbB9+UdmSRpulqv5Wagr8wjDcRrNs2741DNQZhO4=";
|
inherit hash;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
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
|
let
|
||||||
|
inherit (builtins) mapAttrs attrValues;
|
||||||
inherit (pkgs) python3Packages;
|
inherit (pkgs) python3Packages;
|
||||||
llm = python3Packages.callPackage ../llm { };
|
mkPlugin = name: attrs: python3Packages.callPackage (import (../. + "/llm-${name}") attrs) { };
|
||||||
plugins = [
|
|
||||||
"anthropic"
|
|
||||||
"gemini"
|
|
||||||
"cmd"
|
|
||||||
"jq"
|
|
||||||
];
|
|
||||||
|
|
||||||
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 = (
|
pyWithLlm = (
|
||||||
pkgs.python3.withPackages (
|
pkgs.python3.withPackages (
|
||||||
|
|
Loading…
Add table
Reference in a new issue