nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, jsonschema
5, pytestCheckHook
6, python-dateutil
7, python-socketio
8, pythonOlder
9, requests
10, websocket-client
11}:
12
13buildPythonPackage rec {
14 pname = "ripe-atlas-cousteau";
15 version = "2.0.0";
16 format = "setuptools";
17
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchFromGitHub {
22 owner = "RIPE-NCC";
23 repo = pname;
24 rev = "refs/tags/v${version}";
25 hash = "sha256-z8ZXOiCVYughrbmXfnwtks7NPmYpII2BA0+8mr1cdSQ=";
26 };
27
28 postPatch = ''
29 substituteInPlace setup.py \
30 --replace "websocket-client~=1.3.1" "websocket-client"
31 '';
32
33 propagatedBuildInputs = [
34 python-dateutil
35 requests
36 python-socketio
37 websocket-client
38 ] ++ python-socketio.optional-dependencies.client;
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 jsonschema
43 ];
44
45 pythonImportsCheck = [
46 "ripe.atlas.cousteau"
47 ];
48
49 meta = with lib; {
50 description = "Python client library for RIPE ATLAS API";
51 homepage = "https://github.com/RIPE-NCC/ripe-atlas-cousteau";
52 changelog = "https://github.com/RIPE-NCC/ripe-atlas-cousteau/blob/v${version}/CHANGES.rst";
53 license = licenses.gpl3Only;
54 maintainers = with maintainers; [ raitobezarius ];
55 };
56}