From 85beb27fcaefcd56eea303df654e8ef2f22fa855 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Jan 2024 16:39:09 +0100 Subject: [PATCH 1/2] python311Packages.asyncinotify: refactor --- .../python-modules/asyncinotify/default.nix | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/asyncinotify/default.nix b/pkgs/development/python-modules/asyncinotify/default.nix index feb778c729aa..6c949c3c34d4 100644 --- a/pkgs/development/python-modules/asyncinotify/default.nix +++ b/pkgs/development/python-modules/asyncinotify/default.nix @@ -1,19 +1,22 @@ { lib , buildPythonPackage -, fetchFromGitLab +, fetchFromGitHub , flit-core -, python +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "asyncinotify"; version = "4.0.2"; - format = "pyproject"; + pyproject = true; - src = fetchFromGitLab { - owner = "Taywee"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "absperf"; repo = "asyncinotify"; - rev = "v${version}"; + rev = "refs/tags/v${version}"; hash = "sha256-Q7b406UENCmD9SGbaml+y2YLDi7VLZBmDkYMo8CLuVw="; }; @@ -21,15 +24,22 @@ buildPythonPackage rec { flit-core ]; - checkPhase = '' - ${python.pythonOnBuildForHost.interpreter} ${src}/test.py - ''; - pythonImportsCheck = ["asyncinotify"]; + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "asyncinotify" + ]; + + pytestFlagsArray = [ + "test.py" + ]; meta = with lib; { - description = "A simple optionally-async python inotify library, focused on simplicity of use and operation, and leveraging modern Python features"; - homepage = "https://pypi.org/project/asyncinotify/"; - changelog = "https://gitlab.com/Taywee/asyncinotify/-/blob/master/CHANGELOG.md"; + description = "Module for inotify"; + homepage = "https://github.com/absperf/asyncinotify/"; + changelog = "https://github.com/absperf/asyncinotify/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ cynerd ]; }; From 3ed7873bd94ff9e0997cf8376b250fd650e9893e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Jan 2024 16:39:32 +0100 Subject: [PATCH 2/2] python311Packages.asyncinotify: 4.0.2 -> 4.0.6 Diff: https://github.com/absperf/asyncinotify/compare/refs/tags/v4.0.2...v4.0.6 Changelog: https://github.com/absperf/asyncinotify/releases/tag/v4.0.6 --- pkgs/development/python-modules/asyncinotify/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/asyncinotify/default.nix b/pkgs/development/python-modules/asyncinotify/default.nix index 6c949c3c34d4..6fe187bfc3cf 100644 --- a/pkgs/development/python-modules/asyncinotify/default.nix +++ b/pkgs/development/python-modules/asyncinotify/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "asyncinotify"; - version = "4.0.2"; + version = "4.0.6"; pyproject = true; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "absperf"; repo = "asyncinotify"; rev = "refs/tags/v${version}"; - hash = "sha256-Q7b406UENCmD9SGbaml+y2YLDi7VLZBmDkYMo8CLuVw="; + hash = "sha256-RXx6i5dIB2oySVaLoHPRGD9VKgiO5OAXmrzVBq8Ad18="; }; nativeBuildInputs = [