From 12fb062335d4ebf71773fbd31de98a1db9150072 Mon Sep 17 00:00:00 2001 From: klea Date: Mon, 20 Jul 2026 20:26:42 +0000 Subject: [PATCH 1/2] pleroma-bot: modernize --- .../python-modules/pleroma-bot/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pleroma-bot/default.nix b/pkgs/development/python-modules/pleroma-bot/default.nix index 282b22df7693..1589a25cceb2 100644 --- a/pkgs/development/python-modules/pleroma-bot/default.nix +++ b/pkgs/development/python-modules/pleroma-bot/default.nix @@ -8,21 +8,24 @@ requests-oauthlib, requests, pyaml, + setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pleroma-bot"; version = "0.8.6"; - format = "setuptools"; + pyproject = true; + build-system = [ setuptools ]; + __structuredAttrs = true; src = fetchFromGitHub { owner = "robertoszek"; repo = "pleroma-bot"; - rev = version; + tag = finalAttrs.version; hash = "sha256-vJxblpf3NMSyYMHeWG7vHP5AeluTtMtVxOsHgvGDHeA="; }; - propagatedBuildInputs = [ + dependencies = [ pyaml requests requests-oauthlib @@ -43,4 +46,4 @@ buildPythonPackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ robertoszek ]; }; -} +}) From c3576a51da92def325b8188c1071990644cdf450 Mon Sep 17 00:00:00 2001 From: klea Date: Mon, 20 Jul 2026 20:59:25 +0000 Subject: [PATCH 2/2] pleroma-bot: 0.8.6 -> 1.2.0 --- .../python-modules/pleroma-bot/default.nix | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pleroma-bot/default.nix b/pkgs/development/python-modules/pleroma-bot/default.nix index 1589a25cceb2..d4c0cbe987fb 100644 --- a/pkgs/development/python-modules/pleroma-bot/default.nix +++ b/pkgs/development/python-modules/pleroma-bot/default.nix @@ -9,11 +9,15 @@ requests, pyaml, setuptools, + feedparser, + beautifulsoup4, + tqdm, + python, }: buildPythonPackage (finalAttrs: { pname = "pleroma-bot"; - version = "0.8.6"; + version = "1.2.0"; pyproject = true; build-system = [ setuptools ]; __structuredAttrs = true; @@ -22,7 +26,7 @@ buildPythonPackage (finalAttrs: { owner = "robertoszek"; repo = "pleroma-bot"; tag = finalAttrs.version; - hash = "sha256-vJxblpf3NMSyYMHeWG7vHP5AeluTtMtVxOsHgvGDHeA="; + hash = "sha256-my42szvkiUg6vGG6yGjDqN5LlDaertj+yA/pIcjdaLk="; }; dependencies = [ @@ -30,13 +34,27 @@ buildPythonPackage (finalAttrs: { requests requests-oauthlib oauthlib + feedparser + beautifulsoup4 + tqdm ]; + postPatch = '' + substituteInPlace pleroma_bot/tests/test_{exceptions,logger}.py --replace-fail 'return' 'assert' + ''; + nativeCheckInputs = [ pytestCheckHook requests-mock ]; + disabledTestPaths = [ + # Tries to connect to api.twitter.com + "pleroma_bot/tests/test_run.py::test_tweet_order" + # Tries to connect to api.twitter.com and pbs.twimg.com + "pleroma_bot/tests/test_run.py::test_main" + ]; + pythonImportsCheck = [ "pleroma_bot" ]; meta = { @@ -45,5 +63,6 @@ buildPythonPackage (finalAttrs: { homepage = "https://robertoszek.github.io/pleroma-bot/"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ robertoszek ]; + broken = python.pythonAtLeast "3.15"; }; })