mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 03:24:06 +01:00
This is a broken tag. 2.0 actually refers to 0.2. The latest version is
0.4.2
Because of this bulk updates should be skipped for this package.
This reverts commit d246e946ce.
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "batinfo";
|
|
version = "0.4.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nicolargo";
|
|
repo = "batinfo";
|
|
tag = "v${version}";
|
|
hash = "sha256-GgAJJA8bzQJLAU+nxmkDa5LFTHc4NGi+nj9PfKyw8/M=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace test_batinfo.py \
|
|
--replace-fail "self.assertEquals" "self.assertEqual"
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "batinfo" ];
|
|
|
|
disabledTests = [
|
|
# Tests are a bit outdated
|
|
"test_batinfo_capacity"
|
|
"test_batinfo_charge_now"
|
|
"test_batinfo_name_default"
|
|
];
|
|
|
|
passthru = {
|
|
# Upstream has a broken 2.0 tag that causes this package to get downgraded to 0.2
|
|
skipBulkUpdate = true;
|
|
};
|
|
|
|
meta = {
|
|
description = "Module to retrieve battery information";
|
|
homepage = "https://github.com/nicolargo/batinfo";
|
|
license = lib.licenses.lgpl3Plus;
|
|
maintainers = with lib.maintainers; [ koral ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|