From 14bce1c19bd4098971e4ead45196ec499a1c3371 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 14 Sep 2024 13:40:00 +0200 Subject: [PATCH] python312Packages.hcs-utils: refactor Fix build (https://hydra.nixos.org/build/271830497) --- .../python-modules/hcs-utils/default.nix | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/hcs-utils/default.nix b/pkgs/development/python-modules/hcs-utils/default.nix index a69622a440d4..646e6a636cce 100644 --- a/pkgs/development/python-modules/hcs-utils/default.nix +++ b/pkgs/development/python-modules/hcs-utils/default.nix @@ -2,38 +2,45 @@ lib, buildPythonPackage, fetchPypi, + pytestCheckHook, + pythonOlder, + setuptools, six, - glibcLocales, - pytest, + versioneer, }: buildPythonPackage rec { pname = "hcs-utils"; version = "2.0"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.9"; src = fetchPypi { pname = "hcs_utils"; inherit version; - sha256 = "04xq69hrys8lf9kp8pva0c4aphjjfw412km7c32ydkwq0i59rhp2"; + hash = "sha256-4sKcSgSYz+bFYKdOEQh3UsKrCANqX3RnchRpn2EyuBM="; }; - LC_ALL = "en_US.UTF-8"; - - checkPhase = '' - # root does not has /root as home in sandbox - py.test -k 'not test_expand' hcs_utils/test + postPatch = '' + # Remove vendorized versioneer.py + rm versioneer.py ''; - buildInputs = [ - six - glibcLocales + build-system = [ + setuptools + versioneer ]; - nativeCheckInputs = [ pytest ]; + + dependencies = [ six ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + disabledTests = [ "test_expand" ]; meta = with lib; { description = "Library collecting some useful snippets"; - homepage = "https://pypi.python.org/pypi/hcs_utils/1.3"; + homepage = "https://gitlab.com/hcs/hcs_utils"; license = licenses.isc; maintainers = with maintainers; [ lovek323 ]; platforms = platforms.unix;