git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.pysmart: init at 1.1.0 (#142203)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

commit2b6b25e6063ba921e4ff24385eebc03c76d222ff authorPaul TREHIOU <paul@nyanlout.re> dateFri 22 Oct 2021, 15:36 (5 years ago) parentcc5cc31
4 files changed+39−37
pkgs/development/python-modules/pysmart-smartx/default.nix−36 pkgs/development/python-modules/pysmart/default.nix+37 pkgs/top-level/python-aliases.nix+1 pkgs/top-level/python-packages.nix+1−1
pkgs/development/python-modules/pysmart-smartx/default.nixdeleted−36
@@ -1,36 +0,0 @@
1−{ lib
2−, buildPythonPackage
3−, fetchFromGitHub
4−, isPy3k
5−, future
6−, pytestCheckHook
7−, mock
8−}:
9−
10−buildPythonPackage rec {
11− pname = "pysmart-smartx";
12− version = "0.3.10";
13−
14− src = fetchFromGitHub {
15− owner = "smartxworks";
16− repo = "pySMART";
17− rev = "v${version}";
18− sha256 = "1irl4nlgz3ds3aikraa9928gzn6hz8chfh7jnpmq2q7d2vqbdrjs";
19− };
20−
21− propagatedBuildInputs = [ future ];
22−
23− # tests require contextlib.nested
24− doCheck = !isPy3k;
25−
26− checkInputs = [ pytestCheckHook mock ];
27−
28− pythonImportsCheck = [ "pySMART" ];
29−
30− meta = with lib; {
31− description = "It's a fork of pySMART with lots of bug fix and enhances";
32− homepage = "https://github.com/smartxworks/pySMART";
33− maintainers = with maintainers; [ rhoriguchi ];
34− license = licenses.gpl2Only;
35− };
36−}
pkgs/development/python-modules/pysmart/default.nixnew file+37
@@ -0,0 +1,37 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, smartmontools
5+, humanfriendly
6+, pytestCheckHook
7+}:
8+
9+buildPythonPackage rec {
10+ pname = "pysmart";
11+ version = "1.1.0";
12+
13+ src = fetchFromGitHub {
14+ owner = "truenas";
15+ repo = "py-SMART";
16+ rev = "v${version}";
17+ sha256 = "sha256-e46ALiYg0Db/gOzqLmVc1vi9ObhfxzqwfQk9/9pz+r0=";
18+ };
19+
20+ postPatch = ''
21+ substituteInPlace pySMART/utils.py \
22+ --replace "which('smartctl')" '"${smartmontools}/bin/smartctl"'
23+ '';
24+
25+ propagatedBuildInputs = [ humanfriendly ];
26+
27+ checkInputs = [ pytestCheckHook ];
28+
29+ pythonImportsCheck = [ "pySMART" ];
30+
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+ };
37+}
pkgs/top-level/python-aliases.nix+1
@@ -62,6 +62,7 @@ mapAliases ({
6262 prompt_toolkit = prompt-toolkit;
6363 pylibgen = throw "pylibgen is unmaintained upstreamed, and removed from nixpkgs"; # added 2020-06-20
6464 pymssql = throw "pymssql has been abandoned upstream."; # added 2020-05-04
65+ pysmart-smartx = pysmart; # added 2021-10-22
6566 pytestcov = pytest-cov; # added 2021-01-04
6667 pytest-pep8 = pytestpep8; # added 2021-01-04
6768 pytestpep8 = throw "pytestpep8 was removed because it is abandoned and no longer compatible with pytest v6.0"; # added 2020-12-10
pkgs/top-level/python-packages.nix+1−1
@@ -6989,7 +6989,7 @@ in {
69896989
69906990 pysmappee = callPackage ../development/python-modules/pysmappee { };
69916991
6992− pysmart-smartx = callPackage ../development/python-modules/pysmart-smartx { };
6992+ pysmart = callPackage ../development/python-modules/pysmart { };
69936993
69946994 pysmartapp = callPackage ../development/python-modules/pysmartapp { };
69956995