mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-11-03 19:31:34 +00:00
52 lines
919 B
Nix
52 lines
919 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
hatchling,
|
|
uv-dynamic-versioning,
|
|
|
|
# dependencies
|
|
httpx2,
|
|
pydantic,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "genai-prices";
|
|
version = "0.2.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pydantic";
|
|
repo = "genai-prices";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-TKfRr36shyLlBP6i6pdr6gBIRdB1Vpy2h1eKbKIX2N8=";
|
|
};
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/packages/python";
|
|
|
|
build-system = [
|
|
hatchling
|
|
uv-dynamic-versioning
|
|
];
|
|
|
|
dependencies = [
|
|
httpx2
|
|
pydantic
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"genai_prices"
|
|
];
|
|
|
|
doCheck = false; # no tests
|
|
|
|
meta = {
|
|
description = "Calculate prices for calling LLM inference APIs";
|
|
homepage = "https://github.com/pydantic/genai-prices";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ hexa ];
|
|
};
|
|
})
|