diff --git a/pkgs/development/python-modules/python-binance/default.nix b/pkgs/development/python-modules/python-binance/default.nix index a750f02505ac..cd1e09557ecb 100644 --- a/pkgs/development/python-modules/python-binance/default.nix +++ b/pkgs/development/python-modules/python-binance/default.nix @@ -1,25 +1,55 @@ -{ lib, buildPythonPackage, fetchPypi -, pytest, requests-mock, tox -, autobahn, certifi, chardet, cryptography, dateparser, pyopenssl, requests, service-identity, twisted, ujson }: +{ lib +, aiohttp +, buildPythonPackage +, dateparser +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +, requests-mock +, six +, ujson +, websockets +}: buildPythonPackage rec { - version = "0.7.9"; pname = "python-binance"; + version = "1.0.10"; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "476459d91f6cfe0a37ccac38911643ea6cca632499ad8682e0957a075f73d239"; + src = fetchFromGitHub { + owner = "sammchardy"; + repo = pname; + rev = "v${version}"; + sha256 = "09pq2blvky1ah4k8yc6zkp2g5nkn3awc52ad3lxvj6m33akfzxiv"; }; - doCheck = false; # Tries to test multiple interpreters with tox - checkInputs = [ pytest requests-mock tox ]; + propagatedBuildInputs = [ + aiohttp + dateparser + requests + six + ujson + websockets + ]; - propagatedBuildInputs = [ autobahn certifi chardet cryptography dateparser pyopenssl requests service-identity twisted ujson ]; + checkInputs = [ + pytestCheckHook + requests-mock + ]; - meta = { + disabledTestPaths = [ + # Tests require network access + "tests/test_api_request.py" + "tests/test_historical_klines.py" + ]; + + pythonImportsCheck = [ "binance" ]; + + meta = with lib; { description = "Binance Exchange API python implementation for automated trading"; homepage = "https://github.com/sammchardy/python-binance"; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.bhipple ]; + license = licenses.mit; + maintainers = with maintainers; [ bhipple ]; }; }