Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.05 48 lines 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, smartmontools 5, humanfriendly 6, pytestCheckHook 7, pythonOlder 8}: 9 10buildPythonPackage rec { 11 pname = "pysmart"; 12 version = "1.2.3"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "truenas"; 19 repo = "py-SMART"; 20 rev = "refs/tags/v${version}"; 21 hash = "sha256-5VoZEgHWmHUDkm2KhBP0gfmhOJUYJUqDLWBp/kU1404="; 22 }; 23 24 postPatch = '' 25 substituteInPlace pySMART/utils.py \ 26 --replace "which('smartctl')" '"${smartmontools}/bin/smartctl"' 27 ''; 28 29 propagatedBuildInputs = [ 30 humanfriendly 31 ]; 32 33 nativeCheckInputs = [ 34 pytestCheckHook 35 ]; 36 37 pythonImportsCheck = [ 38 "pySMART" 39 ]; 40 41 meta = with lib; { 42 description = "Wrapper for smartctl (smartmontools)"; 43 homepage = "https://github.com/truenas/py-SMART"; 44 changelog = "https://github.com/truenas/py-SMART/blob/v${version}/CHANGELOG.md"; 45 license = licenses.lgpl21Only; 46 maintainers = with maintainers; [ nyanloutre ]; 47 }; 48}