Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 importlib-metadata, 6 pydantic, 7 ruamel-yaml, 8 typing-extensions, 9 setuptools-scm, 10 pytest-mock, 11 pytestCheckHook, 12}: 13 14buildPythonPackage rec { 15 pname = "pydantic-yaml"; 16 version = "1.5.1"; 17 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "NowanIlfideme"; 22 repo = "pydantic-yaml"; 23 tag = "v${version}"; 24 hash = "sha256-UOehghNjPymuZtGp1yM5T15M6/XmK1rgTN9uVCVOst4="; 25 }; 26 27 postPatch = '' 28 substituteInPlace src/pydantic_yaml/version.py \ 29 --replace-fail "0.0.0" "${version}" 30 ''; 31 32 build-system = [ setuptools-scm ]; 33 34 dependencies = [ 35 importlib-metadata 36 pydantic 37 ruamel-yaml 38 typing-extensions 39 ]; 40 41 pythonImportsCheck = [ "pydantic_yaml" ]; 42 43 nativeCheckInputs = [ 44 pytest-mock 45 pytestCheckHook 46 ]; 47 48 meta = { 49 description = "Small helper library that adds some YAML capabilities to pydantic"; 50 homepage = "https://github.com/NowanIlfideme/pydantic-yaml"; 51 changelog = "https://github.com/NowanIlfideme/pydantic-yaml/releases/tag/${src.tag}"; 52 license = lib.licenses.mit; 53 maintainers = with lib.maintainers; [ jnsgruk ]; 54 }; 55}