1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, python
5}:
6
7buildPythonPackage rec {
8 pname = "aiocoap";
9 version = "0.4b3";
10
11 src = fetchFromGitHub {
12 owner = "chrysn";
13 repo = pname;
14 rev = version;
15 sha256 = "1zjg475xgvi19rqg7jmfgy5nfabq50aph0231p9jba211ps7cmxw";
16 };
17
18 checkPhase = ''
19 ${python.interpreter} -m aiocoap.cli.defaults
20 ${python.interpreter} -m unittest discover -v
21 '';
22
23 pythonImportsCheck = [ "aiocoap" ];
24
25 meta = with lib; {
26 description = "Python CoAP library";
27 homepage = "https://aiocoap.readthedocs.io/";
28 license = with licenses; [ mit ];
29 maintainers = with maintainers; [ fab ];
30 };
31}