From 2967f4c6a0c88f7f5397ad5190823880f28e9c49 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Jan 2024 16:48:45 +0100 Subject: [PATCH 1/2] python311Packages.pyarrow-hotfix: init at 0.6 Hotfix for the PyArrow security vulnerability CVE-2023-47248 https://github.com/pitrou/pyarrow-hotfix --- .../python-modules/pyarrow-hotfix/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/pyarrow-hotfix/default.nix diff --git a/pkgs/development/python-modules/pyarrow-hotfix/default.nix b/pkgs/development/python-modules/pyarrow-hotfix/default.nix new file mode 100644 index 000000000000..38a8dc4b6ea8 --- /dev/null +++ b/pkgs/development/python-modules/pyarrow-hotfix/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, hatchling +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyarrow-hotfix"; + version = "0.6"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "pitrou"; + repo = "pyarrow-hotfix"; + rev = "refs/tags/v${version}"; + hash = "sha256-LlSbxIxvouzvlP6PB8J8fJaxWoRbxz4wTs7Gb5LbM4A="; + }; + + nativeBuildInputs = [ + hatchling + ]; + + pythonImportsCheck = [ + "pyarrow_hotfix" + ]; + + meta = with lib; { + description = "Hotfix for the PyArrow security vulnerability CVE-2023-47248"; + homepage = "https://github.com/pitrou/pyarrow-hotfix"; + changelog = "https://github.com/pitrou/pyarrow-hotfix/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cbbe4a9074f1..f96469dc1c39 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10060,6 +10060,8 @@ self: super: with self; { inherit (pkgs) arrow-cpp cmake; }; + pyarrow-hotfix = callPackage ../development/python-modules/pyarrow-hotfix { }; + pyasn = callPackage ../development/python-modules/pyasn { }; pyasn1 = callPackage ../development/python-modules/pyasn1 { }; From 7a613dd4891f146104be7261a2450f7349767d8a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Jan 2024 17:31:10 +0100 Subject: [PATCH 2/2] python311Packages.pins: init at 0.8.4 Module to publishes data, models and other Python objects https://github.com/rstudio/pins-python --- .../python-modules/pins/default.nix | 104 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 106 insertions(+) create mode 100644 pkgs/development/python-modules/pins/default.nix diff --git a/pkgs/development/python-modules/pins/default.nix b/pkgs/development/python-modules/pins/default.nix new file mode 100644 index 000000000000..3d02d7b03728 --- /dev/null +++ b/pkgs/development/python-modules/pins/default.nix @@ -0,0 +1,104 @@ +{ lib +, adlfs +, appdirs +, buildPythonPackage +, fastparquet +, fetchFromGitHub +, fsspec +, gcsfs +, humanize +, importlib-metadata +, importlib-resources +, jinja2 +, joblib +, pandas +, pyarrow +, pytest-cases +, pytest-parallel +, pytestCheckHook +, pythonOlder +, pyyaml +, requests +, s3fs +, setuptools +, setuptools-scm +, xxhash +}: + +buildPythonPackage rec { + pname = "pins"; + version = "0.8.4"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "rstudio"; + repo = "pins-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-rNIjHwFELHoxDxC/T5vPzHA6Ifjz01rJpTK6kjUxOIM="; + }; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + propagatedBuildInputs = [ + appdirs + fsspec + humanize + importlib-metadata + importlib-resources + jinja2 + joblib + pandas + pyyaml + requests + xxhash + ]; + + passthru.optional-dependencies = { + aws = [ + s3fs + ]; + azure = [ + adlfs + ]; + gcs = [ + gcsfs + ]; + }; + + nativeCheckInputs = [ + fastparquet + pyarrow + pytest-cases + pytest-parallel + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + pythonImportsCheck = [ + "pins" + ]; + + pytestFlagsArray = [ + "pins/tests/" + ]; + + disabledTestPaths = [ + # Tests require network access + "pins/tests/test_boards.py" + "pins/tests/test_compat.py" + "pins/tests/test_constructors.py" + "pins/tests/test_rsconnect_api.py" + ]; + + meta = with lib; { + description = "Module to publishes data, models and other Python objects"; + homepage = "https://github.com/rstudio/pins-python"; + changelog = "https://github.com/rstudio/pins-python/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f96469dc1c39..4b02f09439e7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9174,6 +9174,8 @@ self: super: with self; { ping3 = callPackage ../development/python-modules/ping3 { }; + pins = callPackage ../development/python-modules/pins { }; + pg8000 = callPackage ../development/python-modules/pg8000 { }; pgcli = callPackage ../development/python-modules/pgcli { };