f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
59 lines
1.2 KiB
Nix
59 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
async-timeout,
|
|
attrs,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
httpx,
|
|
orjson,
|
|
packaging,
|
|
pythonOlder,
|
|
setuptools,
|
|
xmltodict,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "axis";
|
|
version = "62";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Kane610";
|
|
repo = "axis";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-ey0yt+AIbMO74brHepnCFtekDS4XscTKswshlTrS41A=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail "setuptools==68.0.0" "setuptools" \
|
|
--replace-fail "wheel==0.40.0" "wheel"
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
async-timeout
|
|
attrs
|
|
httpx
|
|
orjson
|
|
packaging
|
|
xmltodict
|
|
];
|
|
|
|
# Tests requires a server on localhost
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "axis" ];
|
|
|
|
meta = with lib; {
|
|
description = "Python library for communicating with devices from Axis Communications";
|
|
mainProgram = "axis";
|
|
homepage = "https://github.com/Kane610/axis";
|
|
changelog = "https://github.com/Kane610/axis/releases/tag/v${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|