10 buildPythonPackage rec {
15 disabled = pythonOlder "3.7";
17 src = fetchFromGitHub {
20 rev = "refs/tags/v${version}";
21 hash = "sha256-GgAJJA8bzQJLAU+nxmkDa5LFTHc4NGi+nj9PfKyw8/M=";
25 substituteInPlace test_batinfo.py \
26 --replace-fail "self.assertEquals" "self.assertEqual"
29 build-system = [ setuptools ];
31 nativeCheckInputs = [ pytestCheckHook ];
33 pythonImportsCheck = [ "batinfo" ];
36 # Tests are a bit outdated
37 "test_batinfo_capacity"
38 "test_batinfo_charge_now"
39 "test_batinfo_name_default"
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;