diff --git a/pkgs/development/python-modules/crownstone-cloud/default.nix b/pkgs/development/python-modules/crownstone-cloud/default.nix index d8ee18a090d4..089d60fceb6f 100644 --- a/pkgs/development/python-modules/crownstone-cloud/default.nix +++ b/pkgs/development/python-modules/crownstone-cloud/default.nix @@ -1,57 +1,42 @@ -{ lib -, aiohttp -, buildPythonPackage -, fetchFromGitHub -, fetchpatch -, certifi -, pythonOlder -, pytestCheckHook +{ + lib, + aiohttp, + buildPythonPackage, + fetchPypi, + certifi, + pythonOlder, + pytestCheckHook, + setuptools, }: buildPythonPackage rec { pname = "crownstone-cloud"; - version = "1.4.9"; - format = "setuptools"; + version = "1.4.11"; + pyproject = true; disabled = pythonOlder "3.8"; - src = fetchFromGitHub { - owner = "crownstone"; - repo = "crownstone-lib-python-cloud"; - rev = "refs/tags/${version}"; - hash = "sha256-CS1zeQiWPnsGCWixCsN9sz08mPORW5sVqIpSFPh0Qt0="; + src = fetchPypi { + pname = "crownstone_cloud"; + inherit version; + hash = "sha256-s84pK52uMupxQfdMldV14V3nj+yVku1Vw13CRX4o08U="; }; - patches = [ - # Remove asynctest, https://github.com/crownstone/crownstone-lib-python-cloud/pull/4 - (fetchpatch { - name = "remove-asynctest.patch"; - url = "https://github.com/crownstone/crownstone-lib-python-cloud/commit/7f22c9b284bf8d7f6f43e205816787dd3bb37e78.patch"; - hash = "sha256-LS1O9LVB14WyBXfuHf/bs1juJ59zWhJ8pL4aGtVrTG8="; - }) - ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ aiohttp certifi ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; - postPatch = '' - sed -i '/codecov/d' requirements.txt - ''; - - pythonImportsCheck = [ - "crownstone_cloud" - ]; + pythonImportsCheck = [ "crownstone_cloud" ]; meta = with lib; { description = "Python module for communicating with Crownstone Cloud and devices"; - homepage = "https://github.com/crownstone/crownstone-lib-python-cloud"; - license = with licenses; [ mit ]; + homepage = "https://github.com/Crownstone-Community/crownstone-lib-python-cloud"; + license = licenses.mit; maintainers = with maintainers; [ fab ]; }; } diff --git a/pkgs/development/python-modules/crownstone-sse/default.nix b/pkgs/development/python-modules/crownstone-sse/default.nix index ca2cd4e0d154..82f106d8f9ec 100644 --- a/pkgs/development/python-modules/crownstone-sse/default.nix +++ b/pkgs/development/python-modules/crownstone-sse/default.nix @@ -1,26 +1,29 @@ -{ lib -, aiohttp -, buildPythonPackage -, certifi -, fetchFromGitHub -, pythonOlder +{ + lib, + aiohttp, + buildPythonPackage, + certifi, + fetchPypi, + pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "crownstone-sse"; - version = "2.0.4"; - format = "setuptools"; + version = "2.0.5"; + pyproject = true; disabled = pythonOlder "3.8"; - src = fetchFromGitHub { - owner = "crownstone"; - repo = "crownstone-lib-python-sse"; - rev = version; - hash = "sha256-z/z8MmydHkHubwuX02gGbOcOEZ+FHX4i82vAK5gAl+c="; + src = fetchPypi { + pname = "crownstone_sse"; + inherit version; + hash = "sha256-RUqo68UAVGV+JmauKsGlp7dG8FzixHBDnr3eho/IQdY="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ aiohttp certifi ]; @@ -28,13 +31,11 @@ buildPythonPackage rec { # Tests are only providing coverage doCheck = false; - pythonImportsCheck = [ - "crownstone_sse" - ]; + pythonImportsCheck = [ "crownstone_sse" ]; meta = with lib; { description = "Python module for listening to Crownstone SSE events"; - homepage = "https://github.com/crownstone/crownstone-lib-python-sse"; + homepage = "https://github.com/Crownstone-Community/crownstone-lib-python-sse"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; };