e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, chardet
|
|
, humanfriendly
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, setuptools-scm
|
|
, smartmontools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pysmart";
|
|
version = "1.3.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "truenas";
|
|
repo = "py-SMART";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-1k+5XnIT/AfZmzKUxkyU/uc0eW05CvugpY6OdJCoALc=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pySMART/utils.py \
|
|
--replace "which('smartctl')" '"${smartmontools}/bin/smartctl"'
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
chardet
|
|
humanfriendly
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-scm
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pySMART"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Wrapper for smartctl (smartmontools)";
|
|
homepage = "https://github.com/truenas/py-SMART";
|
|
changelog = "https://github.com/truenas/py-SMART/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.lgpl21Only;
|
|
maintainers = with maintainers; [ nyanloutre ];
|
|
};
|
|
}
|