Files
nixpkgs/pkgs/development/python-modules/genai-prices/default.nix
2026-11-12 18:44:17 +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.3";
pyproject = true;
src = fetchFromGitHub {
owner = "pydantic";
repo = "genai-prices";
tag = "v${finalAttrs.version}";
hash = "sha256-Cn3WwQ/53WzF7xgOqqteyWecvajuDZKnIXO6rlD2W20=";
};
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 ];
};
})