From 8c06d68a9a83f086e4f3a5f9411bf9ed3f8d0dcb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 8 Sep 2024 10:54:06 +0200 Subject: [PATCH] python312Packages.pandantic: init at 0.3.1 Module to enriche the Pydantic BaseModel class https://github.com/wesselhuising/pandantic --- .../python-modules/pandantic/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/pandantic/default.nix diff --git a/pkgs/development/python-modules/pandantic/default.nix b/pkgs/development/python-modules/pandantic/default.nix new file mode 100644 index 000000000000..a33f2ee706ce --- /dev/null +++ b/pkgs/development/python-modules/pandantic/default.nix @@ -0,0 +1,48 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + multiprocess, + pandas-stubs, + pandas, + poetry-core, + pydantic, + pytestCheckHook, + pythonOlder, +}: + +buildPythonPackage rec { + pname = "pandantic"; + version = "0.3.1"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "wesselhuising"; + repo = "pandantic"; + rev = "refs/tags/${version}"; + hash = "sha256-JRhnDVRYX0OV/dZkfqNoS2qFcoHOZHm9QZphF/JhgxM="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ + multiprocess + pandas + pandas-stubs + pydantic + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "pandantic" ]; + + meta = { + description = "Module to enriche the Pydantic BaseModel class"; + homepage = "https://github.com/wesselhuising/pandantic"; + changelog = "https://github.com/wesselhuising/pandantic/releases/tag/${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 49045d27c5b8..329b7575001d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9491,6 +9491,8 @@ self: super: with self; { panasonic-viera = callPackage ../development/python-modules/panasonic-viera { }; + pandantic = callPackage ../development/python-modules/pandantic { }; + pandas = callPackage ../development/python-modules/pandas { inherit (pkgs.darwin) adv_cmds; };