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 = "64";
18 pyproject = true;
19
20 disabled = pythonOlder "3.12";
21
22 src = fetchFromGitHub {
23 owner = "Kane610";
24 repo = "axis";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-6g4Dqk+oGlEcqlNuMiwep+NCVFmwRZjKgEZC1OzmKw0=";
27 };
28
29 postPatch = ''
30 substituteInPlace pyproject.toml \
31 --replace-fail "setuptools==75.6.0" "setuptools" \
32 --replace-fail "wheel==0.45.1" "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 homepage = "https://github.com/Kane610/axis";
54 changelog = "https://github.com/Kane610/axis/releases/tag/v${version}";
55 license = licenses.mit;
56 maintainers = with maintainers; [ fab ];
57 mainProgram = "axis";
58 };
59}