about summary refs log tree commit diff
path: root/pkgs/applications/networking/p2p
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2023-07-05 22:33:21 +0200
committerGitHub <noreply@github.com>2023-07-05 22:33:21 +0200
commit3cc4689339e0acd39c91aea0f11136fb253fa6ff (patch)
treeec31520b6bb6700b6804b365c84ca098d13bbd7e /pkgs/applications/networking/p2p
parent08c696c8d702e98d6693efea6d0be94b54849a16 (diff)
parent7db89d08516608e53bf777245375c19dd9627eef (diff)
Merge pull request #235848 from fabaff/prometheus-client-bump
python310Packages.prometheus-client: 0.16.0 -> 0.17.0
Diffstat (limited to 'pkgs/applications/networking/p2p')
-rw-r--r--pkgs/applications/networking/p2p/pyrosimple/default.nix64
1 files changed, 25 insertions, 39 deletions
diff --git a/pkgs/applications/networking/p2p/pyrosimple/default.nix b/pkgs/applications/networking/p2p/pyrosimple/default.nix
index c735057e4573f..26f1e1574c204 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;
+python3.pkgs.buildPythonApplication rec {
+  pname = "pyrosimple";
+  version = "2.9.0";
+  format = "pyproject";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-K0QjEcGzROlSWuUHWqUbcOdKccrHex2SlwPAmsmIbaQ=";
+  src = fetchFromGitHub {
+    owner = "kannibalox";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    hash = "sha256-KDQUSsotTpmnYq7kCRGIRWCZKxr2bxPKCvKy+OmoOm8=";
   };
 
-  format = "pyproject";
+  pythonRelaxDeps = [
+    "prometheus-client"
+    "python-daemon"
+  ];
 
-  nativeBuildInputs = [
+  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 ];
   };
-
 }