Files
nixpkgs/pkgs/development/python-modules/bimmer-connected/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

84 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
pbr,
httpx,
pillow,
pycryptodome,
pyjwt,
pytest-asyncio,
pytestCheckHook,
python,
respx,
setuptools,
time-machine,
tzdata,
}:
buildPythonPackage rec {
pname = "bimmer-connected";
version = "0.17.3";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bimmerconnected";
repo = "bimmer_connected";
tag = version;
hash = "sha256-XKKMOKvZO6CrAioflyhTWZrNJv1+5yqYPFL4Al8YPY8=";
};
build-system = [
pbr
setuptools
];
PBR_VERSION = version;
dependencies = [
httpx
pycryptodome
pyjwt
];
optional-dependencies = {
china = [ pillow ];
};
postInstall = ''
cp -R bimmer_connected/tests/responses $out/${python.sitePackages}/bimmer_connected/tests/
'';
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
respx
time-machine
]
++ lib.concatAttrValues optional-dependencies;
disabledTests = [
# presumably regressed in pytest-asyncio 0.23.0
"test_get_remote_position_too_old"
];
preCheck = ''
export TZDIR=${tzdata}/${python.sitePackages}/tzdata/zoneinfo
export PATH=$out/bin:$PATH
'';
pythonImportsCheck = [ "bimmer_connected" ];
meta = {
changelog = "https://github.com/bimmerconnected/bimmer_connected/releases/tag/${version}";
description = "Library to read data from the BMW Connected Drive portal";
mainProgram = "bimmerconnected";
homepage = "https://github.com/bimmerconnected/bimmer_connected";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ dotlambda ];
};
}