diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2023-10-27 12:38:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-27 12:38:11 +0200 |
commit | de4db3f41c55f212be38b8b98349826da74cafda (patch) | |
tree | dc9353d1dfb5d004b94abc2be5e8a8c93dfb2426 | |
parent | 640f50fdd8c4901985e40f914632212609c61c63 (diff) | |
parent | 0e2319717862227077531980639f2b45e685b3e6 (diff) | |
download | nixpkgs-de4db3f41c55f212be38b8b98349826da74cafda.tar nixpkgs-de4db3f41c55f212be38b8b98349826da74cafda.tar.gz nixpkgs-de4db3f41c55f212be38b8b98349826da74cafda.tar.bz2 nixpkgs-de4db3f41c55f212be38b8b98349826da74cafda.tar.lz nixpkgs-de4db3f41c55f212be38b8b98349826da74cafda.tar.xz nixpkgs-de4db3f41c55f212be38b8b98349826da74cafda.tar.zst nixpkgs-de4db3f41c55f212be38b8b98349826da74cafda.zip |
Merge pull request #263669 from mweinelt/pydbus-lifesupport
python311Packages.pydbus: patch python311 compat
-rw-r--r-- | pkgs/development/python-modules/py3status/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/python-modules/pydbus/default.nix | 35 |
2 files changed, 31 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/py3status/default.nix b/pkgs/development/python-modules/py3status/default.nix index f0f5484aeb5..d635a6a4a88 100644 --- a/pkgs/development/python-modules/py3status/default.nix +++ b/pkgs/development/python-modules/py3status/default.nix @@ -6,6 +6,7 @@ , dbus-python , fetchPypi , file +, hatchling , i3 , i3ipc , libnotify @@ -24,12 +25,17 @@ buildPythonPackage rec { pname = "py3status"; version = "3.53"; + pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-vZrzHERjAg9J004A2dAbq8hKmAUslCTaRdwEAe9JRqU="; }; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ pytz requests diff --git a/pkgs/development/python-modules/pydbus/default.nix b/pkgs/development/python-modules/pydbus/default.nix index e804b2c8599..64dafa97db7 100644 --- a/pkgs/development/python-modules/pydbus/default.nix +++ b/pkgs/development/python-modules/pydbus/default.nix @@ -1,21 +1,36 @@ -{ lib, buildPythonPackage, fetchPypi, pygobject3, pythonAtLeast }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pygobject3 +}: buildPythonPackage rec { pname = "pydbus"; version = "0.6.0"; + pyproejct = true; - # Python 3.11 changed the API of the `inspect` module and pydbus was never - # updated to adapt; last commit was in 2018. - disabled = pythonAtLeast "3.11"; - - src = fetchPypi { - inherit pname version; - sha256 = "0b0gipvz7vcfa9ddmwq2jrx16d4apb0hdnl5q4i3h8jlzwp1c1s2"; + src = fetchFromGitHub { + owner = "LEW21"; + repo = "pydbus"; + rev = "refs/tags/v${version}"; + hash = "sha256-F1KKXG+7dWlEbToqtF3G7wU0Sco7zH5NqzlL58jyDGw="; }; - propagatedBuildInputs = [ pygobject3 ]; + postPatch = '' + substituteInPlace pydbus/_inspect3.py \ + --replace "getargspec" "getfullargspec" + ''; + + propagatedBuildInputs = [ + pygobject3 + ]; + + pythonImportsCheck = [ + "pydbus" + "pydbus.generic" + ]; - pythonImportsCheck = [ "pydbus" ]; + doCheck = false; # requires a working dbus setup meta = { homepage = "https://github.com/LEW21/pydbus"; |