python312Packages.hcs-utils: refactor

Fix build (https://hydra.nixos.org/build/271830497)
This commit is contained in:
Fabian Affolter
2024-09-14 13:40:00 +02:00
parent ef9abaca05
commit 14bce1c19b
@@ -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;