diff --git a/pkgs/development/python-modules/aioaquacell/default.nix b/pkgs/development/python-modules/aioaquacell/default.nix index d92c176f2b3c..446e6bb76a8a 100644 --- a/pkgs/development/python-modules/aioaquacell/default.nix +++ b/pkgs/development/python-modules/aioaquacell/default.nix @@ -1,48 +1,51 @@ { lib, buildPythonPackage, - fetchPypi, - setuptools, - aiobotocore, + fetchFromGitHub, + poetry-core, aiohttp, - attr, aws-request-signer, + boto3, botocore, - requests-aws4auth, pycognito, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "aioaquacell"; - version = "0.2.0"; + version = "1.0.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-n2kPD1t5d/nf43rB0q1hNNYdHeaBiadsFWTmu1bYN1A="; + src = fetchFromGitHub { + owner = "Jordi1990"; + repo = "aioaquacell"; + tag = finalAttrs.version; + hash = "sha256-ghzuNIqpDwrt2EJ8u74yF5pWdS2nR3FvbPdHQMH4KxE="; }; - build-system = [ setuptools ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'version = "0.0.0"' 'version = "${finalAttrs.version}"' + ''; + + build-system = [ poetry-core ]; dependencies = [ aiohttp - aiobotocore - attr aws-request-signer + boto3 botocore - requests-aws4auth pycognito ]; pythonImportsCheck = [ "aioaquacell" ]; - doCheck = false; + doCheck = false; # no tests meta = { - changelog = "https://github.com/Jordi1990/aioaquacell/releases/tag/v${version}"; + changelog = "https://github.com/Jordi1990/aioaquacell/releases/tag/${finalAttrs.version}"; description = "Asynchronous library to retrieve details of your Aquacell water softener device"; homepage = "https://github.com/Jordi1990/aioaquacell"; license = lib.licenses.asl20; maintainers = [ ]; }; -} +})