nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 aiohttp,
5 buildPythonPackage,
6 fetchFromGitHub,
7 poetry-core,
8 pytest-aiohttp,
9 pytest-cov-stub,
10 pytest-timeout,
11 pytestCheckHook,
12}:
13
14buildPythonPackage rec {
15 pname = "motioneye-client";
16 version = "0.3.14";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "dermotduffy";
21 repo = "motioneye-client";
22 rev = "v${version}";
23 hash = "sha256-kgFSd5RjO+OtnPeAOimPTDVEfJ47rXh2Ku5xEYStHv8=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace 'aiohttp = "^3.8.1,!=3.8.2,!=3.8.3"' 'aiohttp = "*"'
29 '';
30
31 nativeBuildInputs = [ poetry-core ];
32
33 propagatedBuildInputs = [ aiohttp ];
34
35 nativeCheckInputs = [
36 pytest-aiohttp
37 pytest-cov-stub
38 pytest-timeout
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [ "motioneye_client" ];
43
44 meta = {
45 description = "Python library for motionEye";
46 homepage = "https://github.com/dermotduffy/motioneye-client";
47 license = with lib.licenses; [ mit ];
48 maintainers = with lib.maintainers; [ fab ];
49 broken = stdenv.hostPlatform.isDarwin;
50 };
51}