From c58d788284e046403dac33d12e54613247799379 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 1 Jul 2023 21:13:42 +0200 Subject: [PATCH 1/2] python311Packages.rpds-py: init at 0.7.1 --- .../python-modules/rpds-py/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/rpds-py/default.nix diff --git a/pkgs/development/python-modules/rpds-py/default.nix b/pkgs/development/python-modules/rpds-py/default.nix new file mode 100644 index 000000000000..f07a4341aed9 --- /dev/null +++ b/pkgs/development/python-modules/rpds-py/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, cargo +, fetchPypi +, pytestCheckHook +, pythonOlder +, rustc +, rustPlatform +}: + +buildPythonPackage rec { + pname = "rpds-py"; + version = "0.7.1"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "rpds_py"; + inherit version; + hash = "sha256-2UC1ZE8U5JscbnkCueyKDHWEEJ+/OA+hgRWDGmQZJ8g="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-BAoE0oRQGf5ze/8uAH6gsFP77lPvOvYy8W9iDrqUn3Q="; + }; + + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + cargo + rustc + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "rpds" + ]; + + meta = with lib; { + description = "Python bindings to Rust's persistent data structures (rpds"; + homepage = "https://pypi.org/project/rpds-py/"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 143ef142c98c..e590cf4aa295 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10883,6 +10883,8 @@ self: super: with self; { rpdb = callPackage ../development/python-modules/rpdb { }; + rpds-py = callPackage ../development/python-modules/rpds-py { }; + rpi-bad-power = callPackage ../development/python-modules/rpi-bad-power { }; rpi-gpio = callPackage ../development/python-modules/rpi-gpio { }; From 5e24dfe3ff50432078479a06144efb65503b5899 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 1 Jul 2023 21:23:58 +0200 Subject: [PATCH 2/2] python311Packages.referencing: init at 0.29.0 --- .../python-modules/referencing/default.nix | 64 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/development/python-modules/referencing/default.nix diff --git a/pkgs/development/python-modules/referencing/default.nix b/pkgs/development/python-modules/referencing/default.nix new file mode 100644 index 000000000000..571d512c336b --- /dev/null +++ b/pkgs/development/python-modules/referencing/default.nix @@ -0,0 +1,64 @@ +{ lib +, attrs +, buildPythonPackage +, fetchFromGitHub +, hatch-vcs +, hatchling +, jsonschema +, pytest-subtests +, pytestCheckHook +, pythonOlder +, rpds-py +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "referencing"; + version = "0.29.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "python-jsonschema"; + repo = "referencing"; + rev = "refs/tags/v${version}"; + fetchSubmodules = true; + hash = "sha256-+wPNPYu2/0gBmHFJ8aAeZ3dFDC7uFV6Ww3RAbri26Mc="; + }; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + postPatch = '' + sed -i "/Topic/d" pyproject.toml + ''; + + nativeBuildInputs = [ + hatch-vcs + hatchling + setuptools-scm + ]; + + propagatedBuildInputs = [ + attrs + rpds-py + ]; + + nativeCheckInputs = [ + jsonschema + pytest-subtests + pytestCheckHook + ]; + + pythonImportsCheck = [ + "referencing" + ]; + + meta = with lib; { + description = "Cross-specification JSON referencing"; + homepage = "https://github.com/python-jsonschema/referencing"; + changelog = "https://github.com/python-jsonschema/referencing/blob/${version}/CHANGELOG.rst"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e590cf4aa295..e05b25e5e828 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10619,6 +10619,8 @@ self: super: with self; { reedsolo = callPackage ../development/python-modules/reedsolo { }; + referencing = callPackage ../development/python-modules/referencing { }; + reflink = callPackage ../development/python-modules/reflink { }; regenmaschine = callPackage ../development/python-modules/regenmaschine { };