2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
hatchling,
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
django,
|
|
|
|
pydantic,
|
|
|
|
typing-extensions,
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
django-stubs,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-asyncio,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyngo";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.2.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yezz123";
|
|
|
|
repo = "pyngo";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-E3UNgn/L1bbfYljufPp+bGAvSsADpPAvv/eJimD8v50=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
2024-01-13 08:15:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"pydantic"
|
2024-04-21 15:54:59 +00:00
|
|
|
"typing-extensions"
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
pydantic
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyngo" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
django-stubs
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-asyncio
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/yezz123/pyngo/releases/tag/${version}";
|
|
|
|
description = "Pydantic model support for Django & Django-Rest-Framework";
|
|
|
|
homepage = "https://github.com/yezz123/pyngo";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|