Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 grpcio,
6 protobuf,
7 pytest-asyncio,
8 pytest-cov-stub,
9 pytest-mock,
10 pytestCheckHook,
11 setuptools,
12 setuptools-scm,
13}:
14
15buildPythonPackage rec {
16 pname = "aetcd";
17 version = "1.0.0a4";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "martyanov";
22 repo = "aetcd";
23 tag = "v${version}";
24 hash = "sha256-g49ppfh8dyGpZeu/HdTDX8RAk5VTcZmqENRpNY12qkg=";
25 };
26
27 postPatch = ''
28 substituteInPlace setup.py \
29 --replace-fail "setuptools_scm==6.3.2" "setuptools_scm"
30 '';
31
32 pythonRelaxDeps = [ "protobuf" ];
33
34 build-system = [
35 setuptools
36 setuptools-scm
37 ];
38
39 dependencies = [
40 grpcio
41 protobuf
42 ];
43
44 nativeCheckInputs = [
45 pytest-asyncio
46 pytest-cov-stub
47 pytest-mock
48 pytestCheckHook
49 ];
50
51 pythonImportsCheck = [ "aetcd" ];
52
53 disabledTestPaths = [
54 # Tests require a running ectd instance
55 "tests/integration/"
56 ];
57
58 meta = {
59 description = "Python asyncio-based client for etcd";
60 homepage = "https://github.com/martyanov/aetcd";
61 changelog = "https://github.com/martyanov/aetcd/blob/v${version}/docs/changelog.rst";
62 license = lib.licenses.asl20;
63 maintainers = with lib.maintainers; [ fab ];
64 };
65}