diff --git a/pkgs/development/python-modules/events/default.nix b/pkgs/development/python-modules/events/default.nix index 6fe355d9c4d8..f4e9dcd250f0 100644 --- a/pkgs/development/python-modules/events/default.nix +++ b/pkgs/development/python-modules/events/default.nix @@ -1,17 +1,41 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { - pname = "Events"; - version = "0.4"; + pname = "events"; + version = "0.5"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "01d9dd2a061f908d74a89fa5c8f07baa694f02a2a5974983663faaf7a97180f5"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "pyeve"; + repo = "events"; + rev = "refs/tags/v${version}"; + hash = "sha256-GGhIKHbJ31IN0Uoe689X9V/MZvtseE47qx2CmM4MYUs="; }; + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "events" + ]; + + pytestFlagsArray = [ + "events/tests/tests.py" + ]; + meta = with lib; { - homepage = "https://events.readthedocs.org"; description = "Bringing the elegance of C# EventHanlder to Python"; + homepage = "https://events.readthedocs.org"; + changelog = "https://github.com/pyeve/events/blob/v0.5/CHANGES"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pysnooz/default.nix b/pkgs/development/python-modules/pysnooz/default.nix index 24868e7a6b62..8d4adbb86d13 100644 --- a/pkgs/development/python-modules/pysnooz/default.nix +++ b/pkgs/development/python-modules/pysnooz/default.nix @@ -25,13 +25,14 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "AustinBrunkhorst"; repo = pname; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-X7RjI4KytJI9raHAJHLygV3J4zHKuHk8Kq+3JfktPeg="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace 'transitions = "^0.8.11"' 'transitions = ">0.8.11"' \ + --replace 'transitions = "^0.8.11"' 'transitions = ">=0.8.11"' \ + --replace 'Events = "^0.4"' 'Events = ">=0.4"' \ --replace " --cov=pysnooz --cov-report=term-missing:skip-covered" "" ''; @@ -62,6 +63,7 @@ buildPythonPackage rec { meta = with lib; { description = "Library to control SNOOZ white noise machines"; homepage = "https://github.com/AustinBrunkhorst/pysnooz"; + changelog = "https://github.com/AustinBrunkhorst/pysnooz/blob/v${version}/CHANGELOG.md"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; };