2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
attrs,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
httpx,
|
|
|
|
orjson,
|
|
|
|
packaging,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
xmltodict,
|
2021-01-17 00:15:33 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "axis";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "62";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2021-01-17 00:15:33 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2023-02-22 10:55:15 +00:00
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Kane610";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "axis";
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ey0yt+AIbMO74brHepnCFtekDS4XscTKswshlTrS41A=";
|
2021-01-17 00:15:33 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "setuptools==68.0.0" "setuptools" \
|
|
|
|
--replace-fail "wheel==0.40.0" "wheel"
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-02-02 18:25:31 +00:00
|
|
|
async-timeout
|
2021-01-17 00:15:33 +00:00
|
|
|
attrs
|
|
|
|
httpx
|
2023-02-02 18:25:31 +00:00
|
|
|
orjson
|
2021-01-17 00:15:33 +00:00
|
|
|
packaging
|
|
|
|
xmltodict
|
|
|
|
];
|
|
|
|
|
|
|
|
# Tests requires a server on localhost
|
|
|
|
doCheck = false;
|
2023-02-22 10:55:15 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "axis" ];
|
2021-01-17 00:15:33 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for communicating with devices from Axis Communications";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "axis";
|
2021-01-17 00:15:33 +00:00
|
|
|
homepage = "https://github.com/Kane610/axis";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/Kane610/axis/releases/tag/v${version}";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|