nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 amqtt,
5 buildPythonPackage,
6 certifi,
7 docopt,
8 fetchFromGitHub,
9 fetchpatch,
10 geopy,
11 mock,
12 pytest-asyncio_0,
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "volvooncall";
18 version = "0.10.4";
19 format = "setuptools";
20
21 src = fetchFromGitHub {
22 owner = "molobrakos";
23 repo = "volvooncall";
24 tag = "v${version}";
25 hash = "sha256-xr3g93rt3jvxVZrZY7cFh5eBP3k0arsejsgvx8p5EV4=";
26 };
27
28 patches = [
29 # Remove asynctest, https://github.com/molobrakos/volvooncall/pull/92
30 (fetchpatch {
31 name = "remove-asnyc.patch";
32 url = "https://github.com/molobrakos/volvooncall/commit/ef0df403250288c00ed4c600e9dfa79dcba8941e.patch";
33 hash = "sha256-U+hM7vzD9JSEUumvjPSLpVQcc8jAuZHG3/1dQ3wnIcA=";
34 })
35 ];
36
37 propagatedBuildInputs = [ aiohttp ];
38
39 optional-dependencies = {
40 console = [
41 certifi
42 docopt
43 geopy
44 ];
45 mqtt = [
46 amqtt
47 certifi
48 ];
49 };
50
51 checkInputs = [
52 mock
53 pytest-asyncio_0
54 pytestCheckHook
55 ]
56 ++ optional-dependencies.mqtt;
57
58 pythonImportsCheck = [ "volvooncall" ];
59
60 meta = {
61 description = "Retrieve information from the Volvo On Call web service";
62 homepage = "https://github.com/molobrakos/volvooncall";
63 changelog = "https://github.com/molobrakos/volvooncall/releases/tag/v${version}";
64 license = lib.licenses.unlicense;
65 mainProgram = "voc";
66 maintainers = with lib.maintainers; [ dotlambda ];
67 };
68}