From c5f2f20c18cd8d1ab57dcb5c1e203603952a64b5 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Tue, 26 Nov 2024 18:51:46 +0800 Subject: [PATCH] python312Packages.hcs-utils: fix build --- .../python-modules/hcs-utils/default.nix | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/hcs-utils/default.nix b/pkgs/development/python-modules/hcs-utils/default.nix index 0a424e7424bdb9..591d2d9cd1fadc 100644 --- a/pkgs/development/python-modules/hcs-utils/default.nix +++ b/pkgs/development/python-modules/hcs-utils/default.nix @@ -7,6 +7,8 @@ setuptools, six, versioneer, + poetry-core, + fetchFromGitLab, }: buildPythonPackage rec { @@ -16,33 +18,34 @@ buildPythonPackage rec { disabled = pythonOlder "3.9"; - src = fetchPypi { - pname = "hcs_utils"; - inherit version; - hash = "sha256-a2xO+hdyJQjgIEcjtmDZLicyz2kzKRjtpEhge5yaa7M="; + src = fetchFromGitLab { + owner = "hcs"; + repo = "hcs_utils"; + rev = "77668de42895dedb6b4baddf4207f331776de897"; # No tags for 2.1 + hash = "sha256-T0a2lYi3umRZQInEsxnLf5p6+IxkUmGJhgW8l2ESDd0="; }; - postPatch = '' - # Remove vendorized versioneer.py - rm versioneer.py - ''; - build-system = [ setuptools versioneer ]; - dependencies = [ six ]; + dependencies = [ + six + poetry-core + ]; - nativeCheckInputs = [ pytestCheckHook ]; + disabledTests = [ + "test_expand" # It depends on FHS + ]; - disabledTests = [ "test_expand" ]; + nativeCheckInputs = [ pytestCheckHook ]; - meta = with lib; { + meta = { description = "Library collecting some useful snippets"; homepage = "https://gitlab.com/hcs/hcs_utils"; - license = licenses.isc; - maintainers = with maintainers; [ lovek323 ]; - platforms = platforms.unix; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ lovek323 ]; + platforms = lib.platforms.unix; }; }