nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools-scm,
6 aiohttp,
7 beautifulsoup4,
8 lxml,
9 pyjwt,
10 freezegun,
11 pytest-asyncio,
12 pytestCheckHook,
13}:
14
15buildPythonPackage rec {
16 pname = "volkswagencarnet";
17 version = "5.4.5";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "robinostlund";
22 repo = "volkswagencarnet";
23 tag = "v${version}";
24 hash = "sha256-e7h8Dp/C4Q/0Y6viTeCTlzekr1aI5B0gAX5MZBenMCY=";
25 };
26
27 postPatch = ''
28 substituteInPlace tests/conftest.py \
29 --replace-fail 'pytest_plugins = ["pytest_cov"]' 'pytest_plugins = []'
30 '';
31
32 build-system = [ setuptools-scm ];
33
34 dependencies = [
35 aiohttp
36 beautifulsoup4
37 lxml
38 pyjwt
39 ];
40
41 pythonImportsCheck = [ "volkswagencarnet" ];
42
43 nativeCheckInputs = [
44 freezegun
45 pytest-asyncio
46 pytestCheckHook
47 ];
48
49 meta = {
50 changelog = "https://github.com/robinostlund/volkswagencarnet/releases/tag/${src.tag}";
51 description = "Python library for volkswagen carnet";
52 homepage = "https://github.com/robinostlund/volkswagencarnet";
53 license = lib.licenses.gpl3Only;
54 maintainers = with lib.maintainers; [ dotlambda ];
55 };
56}