about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2023-06-02 07:33:42 -0500
committerGitHub <noreply@github.com>2023-06-02 07:33:42 -0500
commit827d5658e44211af89fa73daf772e03df6f47215 (patch)
tree5d197b2f0be4e0781911326f576f519b0853f253 /pkgs
parentd32ea984b0df822abe657a6f2a695c2d30d4a6fe (diff)
parent456dfbb52f000bee00862340f6350ac84b79a687 (diff)
Merge pull request #235477 from rhoriguchi/python3Packages.pysmart
python3Packages.pysmart: 1.2.3 -> 1.2.5
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/pysmart/default.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/pysmart/default.nix b/pkgs/development/python-modules/pysmart/default.nix
index f0ec07437bca1..fc21919a63ab6 100644
--- a/pkgs/development/python-modules/pysmart/default.nix
+++ b/pkgs/development/python-modules/pysmart/default.nix
@@ -1,35 +1,44 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
-, smartmontools
+, chardet
 , humanfriendly
 , pytestCheckHook
 , pythonOlder
+, setuptools-scm
+, smartmontools
 }:
 
 buildPythonPackage rec {
   pname = "pysmart";
-  version = "1.2.3";
-  format = "setuptools";
+  version = "1.2.5";
+  format = "pyproject";
 
   disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "truenas";
     repo = "py-SMART";
-    rev = "refs/tags/v${version}";
-    hash = "sha256-5VoZEgHWmHUDkm2KhBP0gfmhOJUYJUqDLWBp/kU1404=";
+    rev = "v${version}";
+    hash = "sha256-NqE7Twl1kxXrASyxw35xIOTB+LThU0a45NCxh8SUxfI=";
   };
 
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
   postPatch = ''
     substituteInPlace pySMART/utils.py \
       --replace "which('smartctl')" '"${smartmontools}/bin/smartctl"'
   '';
 
   propagatedBuildInputs = [
+    chardet
     humanfriendly
   ];
 
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
   nativeCheckInputs = [
     pytestCheckHook
   ];