nixpkgs/pkgs/development/python-modules/genai-prices/default.nix
2026-06-08 02:48:49 +00:00

49 lines
867 B
Nix

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