evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / batinfo / default.nix
blobcfe0b5d3568052764d1b8a039b29a81e7874d40a
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pytestCheckHook,
6   pythonOlder,
7   setuptools,
8 }:
10 buildPythonPackage rec {
11   pname = "batinfo";
12   version = "0.4.2";
13   pyproject = true;
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "nicolargo";
19     repo = "batinfo";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-GgAJJA8bzQJLAU+nxmkDa5LFTHc4NGi+nj9PfKyw8/M=";
22   };
24   postPatch = ''
25     substituteInPlace test_batinfo.py \
26       --replace-fail "self.assertEquals" "self.assertEqual"
27   '';
29   build-system = [ setuptools ];
31   nativeCheckInputs = [ pytestCheckHook ];
33   pythonImportsCheck = [ "batinfo" ];
35   disabledTests = [
36     # Tests are a bit outdated
37     "test_batinfo_capacity"
38     "test_batinfo_charge_now"
39     "test_batinfo_name_default"
40   ];
42   meta = with lib; {
43     description = "Module to retrieve battery information";
44     homepage = "https://github.com/nicolargo/batinfo";
45     license = licenses.lgpl3Plus;
46     maintainers = with maintainers; [ koral ];
47     platforms = platforms.linux;
48   };