python312Packages.pymdstat: refactor

This commit is contained in:
natsukium
2024-11-02 19:05:26 +09:00
parent 7565a22471
commit bff3e3105a
@@ -2,27 +2,30 @@
lib,
buildPythonPackage,
fetchFromGitHub,
python,
setuptools,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pymdstat";
version = "0.4.3";
format = "setuptools";
pyproject = true;
src = fetchFromGitHub {
owner = "nicolargo";
repo = pname;
repo = "pymdstat";
rev = "v${version}";
sha256 = "sha256-ifQZXc+it/UTltHc1ZL2zxJu7GvAxYzzmB4D+mCqEoE=";
hash = "sha256-ifQZXc+it/UTltHc1ZL2zxJu7GvAxYzzmB4D+mCqEoE=";
};
checkPhase = ''
${python.interpreter} $src/unitest.py
'';
build-system = [ setuptools ];
pythonImportsCheck = [ "pymdstat" ];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "unitest.py" ];
meta = with lib; {
description = "Pythonic library to parse Linux /proc/mdstat file";
homepage = "https://github.com/nicolargo/pymdstat";