2021-10-14 14:12:29 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-12-02 20:21:12 +00:00
|
|
|
, fastjsonschema
|
2021-10-14 14:12:29 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-02 20:21:12 +00:00
|
|
|
, future-typing
|
2021-10-14 14:12:29 +00:00
|
|
|
, inflection
|
2021-12-02 20:21:12 +00:00
|
|
|
, mypy
|
2021-10-14 14:12:29 +00:00
|
|
|
, orjson
|
2021-12-02 20:21:12 +00:00
|
|
|
, pandas
|
|
|
|
, pendulum
|
2021-10-14 14:12:29 +00:00
|
|
|
, poetry-core
|
|
|
|
, pydantic
|
2021-12-02 20:21:12 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-10-14 14:12:29 +00:00
|
|
|
, sqlalchemy
|
2021-12-02 20:21:12 +00:00
|
|
|
, typing-extensions
|
2021-10-14 14:12:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "typical";
|
|
|
|
version = "2.7.9";
|
|
|
|
format = "pyproject";
|
|
|
|
|
2021-12-02 20:21:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-10-14 14:12:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "seandstewart";
|
|
|
|
repo = "typical";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-ITIsSM92zftnvqLiVGFl//IbBb8N3ffkkqohzOx2JO4=";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./use-poetry-core.patch
|
|
|
|
];
|
|
|
|
|
2021-12-02 20:21:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-10-14 14:12:29 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
inflection
|
|
|
|
pendulum
|
|
|
|
fastjsonschema
|
|
|
|
orjson
|
|
|
|
future-typing
|
2021-12-02 20:21:12 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
typing-extensions
|
2021-10-14 14:12:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
mypy
|
|
|
|
pydantic
|
|
|
|
sqlalchemy
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2021-12-02 20:21:12 +00:00
|
|
|
# We use orjson
|
|
|
|
"test_ujson"
|
|
|
|
# ConstraintValueError: Given value <{'key...
|
|
|
|
"test_tagged_union_validate"
|
2021-10-14 14:12:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"benchmark/"
|
|
|
|
];
|
|
|
|
|
2021-12-02 20:21:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"typic"
|
|
|
|
];
|
2021-10-14 14:12:29 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-02 20:21:12 +00:00
|
|
|
description = "Python library for runtime analysis, inference and validation of Python types";
|
2021-10-14 14:12:29 +00:00
|
|
|
homepage = "https://python-typical.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kfollesdal ];
|
|
|
|
};
|
|
|
|
}
|