about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/blocksat-cli/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/blocksat-cli/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/blocksat-cli/default.nix44
1 files changed, 21 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/blocksat-cli/default.nix b/nixpkgs/pkgs/development/python-modules/blocksat-cli/default.nix
index ac53b567e5a9..18437efceb4b 100644
--- a/nixpkgs/pkgs/development/python-modules/blocksat-cli/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/blocksat-cli/default.nix
@@ -1,53 +1,50 @@
 { lib
 , buildPythonPackage
-, fetchPypi
 , distro
+, fetchFromGitHub
+, pyasyncore
 , pysnmp
+, pytestCheckHook
 , python-gnupg
+, pythonAtLeast
+, pythonOlder
 , qrcode
 , requests
-, sseclient-py
-, zfec
-, pytestCheckHook
-, pythonOlder
+, setuptools
 }:
 
 buildPythonPackage rec {
   pname = "blocksat-cli";
-  version = "0.4.6";
-  format = "setuptools";
+  version = "2.4.6";
+  pyproject = true;
 
-  disabled = pythonOlder "3.7";
+  disabled = pythonOlder "3.8";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-uANAMNoAC4HUoUuR5ldxoiy+LLzZVpKosU5JttXLnqg=";
+  src = fetchFromGitHub {
+    owner = "Blockstream";
+    repo = "satellite";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-1gz2lAS/AHeY54AaVXGeofLC68KjAP7POsIaBL3v2EY=";
   };
 
+  nativeBuildInputs = [
+    setuptools
+  ];
+
   propagatedBuildInputs = [
     distro
     pysnmp
     python-gnupg
     qrcode
     requests
-    sseclient-py
-    zfec
+  ] ++ lib.optionals (pythonAtLeast "3.12") [
+    pyasyncore
   ];
 
   nativeCheckInputs = [
     pytestCheckHook
   ];
 
-  disabledTestPaths = [
-    # disable tests which require being connected to the satellite
-    "blocksatcli/test_satip.py"
-    "blocksatcli/api/test_listen.py"
-    "blocksatcli/api/test_msg.py"
-    "blocksatcli/api/test_net.py"
-    # disable tests which require being online
-    "blocksatcli/api/test_order.py"
-  ];
-
   disabledTests = [
     "test_monitor_get_stats"
     "test_monitor_update_with_reporting_enabled"
@@ -61,6 +58,7 @@ buildPythonPackage rec {
   meta = with lib; {
     description = "Blockstream Satellite CLI";
     homepage = "https://github.com/Blockstream/satellite";
+    changelog = "https://github.com/Blockstream/satellite/releases/tag/v${version}";
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ prusnak ];
   };