ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / pysmart / default.nix
blob3bd5fa50a1339fee82d65cd572b46cceb2c39216
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , smartmontools
5 , humanfriendly
6 , pytestCheckHook
7 }:
9 buildPythonPackage rec {
10   pname = "pysmart";
11   version = "1.1.0";
13   src = fetchFromGitHub {
14     owner = "truenas";
15     repo = "py-SMART";
16     rev = "v${version}";
17     sha256 = "sha256-e46ALiYg0Db/gOzqLmVc1vi9ObhfxzqwfQk9/9pz+r0=";
18   };
20   postPatch = ''
21     substituteInPlace pySMART/utils.py \
22       --replace "which('smartctl')" '"${smartmontools}/bin/smartctl"'
23   '';
25   propagatedBuildInputs = [ humanfriendly ];
27   checkInputs = [ pytestCheckHook ];
29   pythonImportsCheck = [ "pySMART" ];
31   meta = with lib; {
32     description = "Wrapper for smartctl (smartmontools)";
33     homepage = "https://github.com/truenas/py-SMART";
34     maintainers = with maintainers; [ nyanloutre ];
35     license = licenses.lgpl21Only;
36   };