diff --git a/pkgs/development/python-modules/bsblan/default.nix b/pkgs/development/python-modules/bsblan/default.nix index ed13a3a3a7ba..e371079b3605 100644 --- a/pkgs/development/python-modules/bsblan/default.nix +++ b/pkgs/development/python-modules/bsblan/default.nix @@ -1,19 +1,16 @@ { lib +, aiohttp +, aresponses , buildPythonPackage , fetchFromGitHub -, pytestCheckHook -, aresponses -, coverage , mypy +, packaging , poetry-core , pydantic , pytest-asyncio -, pytest-cov , pytest-mock +, pytestCheckHook , pythonOlder -, aiohttp -, attrs -, cattrs , yarl }: @@ -22,13 +19,13 @@ buildPythonPackage rec { version = "0.5.5"; format = "pyproject"; - disabled = pythonOlder "3.8"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "liudger"; repo = "python-bsblan"; rev = "v${version}"; - sha256 = "sha256-kq4cML7D9XC/QRPjGfaWcs0H78OOc2IXGua7qJpWYOQ="; + hash = "sha256-kq4cML7D9XC/QRPjGfaWcs0H78OOc2IXGua7qJpWYOQ="; }; nativeBuildInputs = [ @@ -37,22 +34,26 @@ buildPythonPackage rec { propagatedBuildInputs = [ aiohttp - attrs - cattrs + packaging pydantic yarl ]; checkInputs = [ aresponses - coverage mypy pytest-asyncio - pytest-cov pytest-mock pytestCheckHook ]; + postPatch = '' + # Upstream doesn't set a version for the pyproject.toml + substituteInPlace pyproject.toml \ + --replace 'version = "0.0.0"' 'version = "${version}"' \ + --replace "--cov" "" + ''; + pythonImportsCheck = [ "bsblan" ];