diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/dataclass-factory/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/dataclass-factory/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/dataclass-factory/default.nix b/nixpkgs/pkgs/development/python-modules/dataclass-factory/default.nix new file mode 100644 index 000000000000..28caa864d456 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/dataclass-factory/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, nose2 +, typing-extensions +}: + +buildPythonPackage rec { + pname = "dataclass-factory"; + version = "2.13"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "reagento"; + repo = "dataclass-factory"; + rev = version; + hash = "sha256-hNPuqs3TvDleIxflCW5rutbXjDotFRLCNJlcTBFxFAw="; + }; + + nativeCheckInputs = [ + nose2 + ]; + + checkInputs = [ + typing-extensions + ]; + + pythonImportsCheck = [ "dataclass_factory" ]; + + checkPhase = '' + runHook preCheck + + nose2 -v tests + + runHook postCheck + ''; + + meta = with lib; { + description = "Modern way to convert python dataclasses or other objects to and from more common types like dicts or json-like structures"; + homepage = "https://github.com/reagento/dataclass-factory"; + changelog = "https://github.com/reagento/dataclass-factory/releases/tag/${src.rev}"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} |