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-mock, 9 pytestCheckHook, 10 pythonOlder, 11 setuptools, 12 setuptools-scm, 13}: 14 15buildPythonPackage rec { 16 pname = "aetcd"; 17 version = "1.0.0a4"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "martyanov"; 24 repo = "aetcd"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-g49ppfh8dyGpZeu/HdTDX8RAk5VTcZmqENRpNY12qkg="; 27 }; 28 29 postPatch = '' 30 substituteInPlace setup.py \ 31 --replace-fail "setuptools_scm==6.3.2" "setuptools_scm" 32 substituteInPlace setup.cfg \ 33 --replace-fail "--cov=aetcd" "" 34 ''; 35 36 nativeBuildInputs = [ 37 setuptools 38 setuptools-scm 39 ]; 40 41 propagatedBuildInputs = [ 42 grpcio 43 protobuf 44 ]; 45 46 nativeCheckInputs = [ 47 pytest-asyncio 48 pytest-mock 49 pytestCheckHook 50 ]; 51 52 pythonImportsCheck = [ "aetcd" ]; 53 54 disabledTestPaths = [ 55 # Tests require a running ectd instance 56 "tests/integration/" 57 ]; 58 59 meta = with lib; { 60 description = "Python asyncio-based client for etcd"; 61 homepage = "https://github.com/martyanov/aetcd"; 62 changelog = "https://github.com/martyanov/aetcd/blob/v${version}/docs/changelog.rst"; 63 license = licenses.asl20; 64 maintainers = with maintainers; [ fab ]; 65 }; 66}