1{
2 lib,
3 async-timeout,
4 attrs,
5 buildPythonPackage,
6 fetchFromGitHub,
7 httpx,
8 orjson,
9 packaging,
10 pythonOlder,
11 setuptools,
12 xmltodict,
13}:
14
15buildPythonPackage rec {
16 pname = "axis";
17 version = "62";
18 pyproject = true;
19
20 disabled = pythonOlder "3.11";
21
22 src = fetchFromGitHub {
23 owner = "Kane610";
24 repo = "axis";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-ey0yt+AIbMO74brHepnCFtekDS4XscTKswshlTrS41A=";
27 };
28
29 postPatch = ''
30 substituteInPlace pyproject.toml \
31 --replace-fail "setuptools==68.0.0" "setuptools" \
32 --replace-fail "wheel==0.40.0" "wheel"
33 '';
34
35 build-system = [ setuptools ];
36
37 dependencies = [
38 async-timeout
39 attrs
40 httpx
41 orjson
42 packaging
43 xmltodict
44 ];
45
46 # Tests requires a server on localhost
47 doCheck = false;
48
49 pythonImportsCheck = [ "axis" ];
50
51 meta = with lib; {
52 description = "Python library for communicating with devices from Axis Communications";
53 mainProgram = "axis";
54 homepage = "https://github.com/Kane610/axis";
55 changelog = "https://github.com/Kane610/axis/releases/tag/v${version}";
56 license = with licenses; [ mit ];
57 maintainers = with maintainers; [ fab ];
58 };
59}