From 7db89d08516608e53bf777245375c19dd9627eef Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 5 Jul 2023 15:58:30 +0200 Subject: [PATCH] pyrosimple: 2.8.0 -> 2.9.0 Changelog: https://github.com/kannibalox/pyrosimple/blob/v2.9.0/CHANGELOG.md --- .../networking/p2p/pyrosimple/default.nix | 68 ++++++++----------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 28 insertions(+), 42 deletions(-) diff --git a/pkgs/applications/networking/p2p/pyrosimple/default.nix b/pkgs/applications/networking/p2p/pyrosimple/default.nix index c735057e4573..26f1e1574c20 100644 --- a/pkgs/applications/networking/p2p/pyrosimple/default.nix +++ b/pkgs/applications/networking/p2p/pyrosimple/default.nix @@ -1,53 +1,36 @@ { lib , stdenv -, python3Packages +, fetchFromGitHub , nix-update-script , pyrosimple +, python3 , testers -, fetchPypi -, buildPythonPackage -, pythonRelaxDepsHook -, poetry-core -, bencode-py -, apscheduler -, jinja2 -, python-daemon -, importlib-resources -, parsimonious -, prometheus-client -, prompt-toolkit -, requests -, shtab -, inotify , withInotify ? stdenv.isLinux -, python-box -, tomli -, tomli-w }: -let - pname = "pyrosimple"; - version = "2.8.0"; -in buildPythonPackage { - inherit pname version; - - src = fetchPypi { - inherit pname version; - hash = "sha256-K0QjEcGzROlSWuUHWqUbcOdKccrHex2SlwPAmsmIbaQ="; - }; - +python3.pkgs.buildPythonApplication rec { + pname = "pyrosimple"; + version = "2.9.0"; format = "pyproject"; - nativeBuildInputs = [ + src = fetchFromGitHub { + owner = "kannibalox"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-KDQUSsotTpmnYq7kCRGIRWCZKxr2bxPKCvKy+OmoOm8="; + }; + + pythonRelaxDeps = [ + "prometheus-client" + "python-daemon" + ]; + + nativeBuildInputs = with python3.pkgs; [ poetry-core pythonRelaxDepsHook ]; - pythonRelaxDeps = [ - "python-daemon" - ]; - - propagatedBuildInputs = [ + propagatedBuildInputs = with python3.pkgs; [ bencode-py apscheduler jinja2 @@ -59,10 +42,15 @@ in buildPythonPackage { requests shtab python-box - tomli tomli-w + ] ++ lib.optionals (pythonOlder "3.11") [ + tomli ] ++ lib.optional withInotify inotify; + nativeCheckInputs = with python3.pkgs; [ + pytestCheckHook + ]; + passthru = { updateScript = nix-update-script { }; tests = testers.testVersion { @@ -72,12 +60,10 @@ in buildPythonPackage { }; meta = with lib; { + description = "A rTorrent client"; homepage = "https://kannibalox.github.io/pyrosimple/"; - description = "A rTorrent client and Python 3 fork of the pyrocore tools"; - license = licenses.gpl3Plus; changelog = "https://github.com/kannibalox/pyrosimple/blob/v${version}/CHANGELOG.md"; - platforms = platforms.all; + license = licenses.gpl3Plus; maintainers = with maintainers; [ ne9z vamega ]; }; - } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ad848496a9ca..bdd42d8beb7a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33761,7 +33761,7 @@ with pkgs; pwdsafety = callPackage ../tools/security/pwdsafety { }; - pyrosimple = python3Packages.callPackage ../applications/networking/p2p/pyrosimple { }; + pyrosimple = callPackage ../applications/networking/p2p/pyrosimple { }; qbittorrent = libsForQt5.callPackage ../applications/networking/p2p/qbittorrent { }; qbittorrent-nox = qbittorrent.override {