From cf5c8c3369f01fd3365a1ec8afecd4cf1ea2a08d Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 18 Oct 2024 09:06:00 +0200 Subject: [PATCH] python312Packages.monkeytype: init at 23.3.0 --- .../python-modules/monkeytype/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/monkeytype/default.nix diff --git a/pkgs/development/python-modules/monkeytype/default.nix b/pkgs/development/python-modules/monkeytype/default.nix new file mode 100644 index 000000000000..1f24608c8d17 --- /dev/null +++ b/pkgs/development/python-modules/monkeytype/default.nix @@ -0,0 +1,58 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + libcst, + mypy-extensions, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "monkeytype"; + version = "23.3.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "Instagram"; + repo = "MonkeyType"; + rev = "refs/tags/v${version}"; + hash = "sha256-DQ/3go53+0PQkhZcL2dX8MI/z4Iq7kTYd5EbacMNxT4="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + libcst + mypy-extensions + ]; + + pythonImportsCheck = [ + "monkeytype" + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # Disable broken tests + "test_excludes_site_packages" + "test_callee_throws_recovers" + "test_nested_callee_throws_recovers" + "test_caller_handles_callee_exception" + "test_generator_trace" + "test_return_none" + "test_access_property" + ]; + + meta = { + description = "Python library that generates static type annotations by collecting runtime types"; + homepage = "https://github.com/Instagram/MonkeyType/"; + changelog = "https://github.com/Instagram/MonkeyType/blob/${src.rev}/CHANGES.rst"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 064264aa5a10..65af3652b187 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8149,6 +8149,8 @@ self: super: with self; { monkeyhex = callPackage ../development/python-modules/monkeyhex { }; + monkeytype = callPackage ../development/python-modules/monkeytype { }; + monosat = pkgs.monosat.python { inherit buildPythonPackage; inherit (self) cython pytestCheckHook;