Files
nixpkgs/pkgs/development/python-modules/genai-prices/default.nix
2026-11-01 14:49:57 +00:00

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 ];
};
})