depot/third_party/nixpkgs/pkgs/development/python-modules/pydantic-yaml/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

55 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
importlib-metadata,
pydantic,
ruamel-yaml,
typing-extensions,
setuptools-scm,
pytest-mock,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pydantic-yaml";
version = "1.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "NowanIlfideme";
repo = "pydantic-yaml";
rev = "refs/tags/v${version}";
hash = "sha256-Kv1nLR91iwShmCgduXA07+a+2EP1nnvaC7fBAn/ufEM=";
};
postPatch = ''
substituteInPlace src/pydantic_yaml/version.py \
--replace-fail "0.0.0" "${version}"
'';
build-system = [ setuptools-scm ];
dependencies = [
importlib-metadata
pydantic
ruamel-yaml
typing-extensions
];
pythonImportsCheck = [ "pydantic_yaml" ];
nativeCheckInputs = [
pytest-mock
pytestCheckHook
];
meta = {
description = "Small helper library that adds some YAML capabilities to pydantic";
homepage = "https://github.com/NowanIlfideme/pydantic-yaml";
changelog = "https://github.com/NowanIlfideme/pydantic-yaml/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jnsgruk ];
};
}