From fbd3a6d3ceda832c3a796746109fd4b2d26140ae Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 8 May 2024 01:39:25 +0200 Subject: [PATCH] python312Packages.file-read-backwards: refactor --- .../file-read-backwards/default.nix | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/file-read-backwards/default.nix b/pkgs/development/python-modules/file-read-backwards/default.nix index 40578197a8f6..f17097102238 100644 --- a/pkgs/development/python-modules/file-read-backwards/default.nix +++ b/pkgs/development/python-modules/file-read-backwards/default.nix @@ -1,22 +1,42 @@ -{ lib, buildPythonPackage, fetchPypi, mock }: +{ lib +, buildPythonPackage +, fetchPypi +, mock +, pythonOlder +, setuptools +, unittestCheckHook +}: buildPythonPackage rec { pname = "file-read-backwards"; version = "3.1.0"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { pname = "file_read_backwards"; inherit version; - sha256 = "sha256-vQRZO8GTigAyJL5FHV1zXx9EkOHnClaM6NMwu3ZSpoQ="; + hash = "sha256-vQRZO8GTigAyJL5FHV1zXx9EkOHnClaM6NMwu3ZSpoQ="; }; - nativeCheckInputs = [ mock ]; - pythonImportsCheck = [ "file_read_backwards" ]; + build-system = [ + setuptools + ]; + + nativeCheckInputs = [ + mock + unittestCheckHook + ]; + + pythonImportsCheck = [ + "file_read_backwards" + ]; meta = with lib; { - homepage = "https://github.com/RobinNil/file_read_backwards"; description = "Memory efficient way of reading files line-by-line from the end of file"; + homepage = "https://github.com/RobinNil/file_read_backwards"; + changelog = "https://github.com/RobinNil/file_read_backwards/blob/v${version}/HISTORY.rst"; license = licenses.mit; maintainers = with maintainers; [ j0hax ]; };