Files
nixpkgs/pkgs/development/python-modules/genai-prices/default.nix
2026-05-21 07:47:22 +00:00

50 lines
865 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
uv-build,
# dependencies
httpx,
pydantic,
}:
buildPythonPackage (finalAttrs: {
pname = "genai-prices";
version = "0.0.61";
pyproject = true;
src = fetchFromGitHub {
owner = "pydantic";
repo = "genai-prices";
tag = "v${finalAttrs.version}";
hash = "sha256-3w3V6uIeRBTpc2rtkVRVsLlWGzHHksklv3YyCw6/VEI=";
};
sourceRoot = "${finalAttrs.src.name}/packages/python";
build-system = [
uv-build
];
dependencies = [
httpx
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 ];
};
})