1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, pythonOlder
6, packaging
7, paramiko
8, pytestCheckHook
9, requests
10, setuptools-scm
11, urllib3
12, websocket-client
13}:
14
15buildPythonPackage rec {
16 pname = "docker";
17 version = "6.0.1";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-iWxCguXHr1xF6LaDsLDDOTKXT+blD8aQagqDYWqz2pc=";
25 };
26
27 nativeBuildInputs = [
28 setuptools-scm
29 ];
30
31 propagatedBuildInputs = [
32 packaging
33 requests
34 urllib3
35 websocket-client
36 ];
37
38 passthru.optional-dependencies.ssh = [
39 paramiko
40 ];
41
42 checkInputs = [
43 pytestCheckHook
44 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
45
46 pytestFlagsArray = [
47 "tests/unit"
48 ];
49
50 # Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
51 disabledTests = lib.optionals stdenv.isDarwin [
52 "api_test" "stream_response" "socket_file"
53 ];
54
55 dontUseSetuptoolsCheck = true;
56
57 pythonImportsCheck = [
58 "docker"
59 ];
60
61 meta = with lib; {
62 description = "An API client for docker written in Python";
63 homepage = "https://github.com/docker/docker-py";
64 license = licenses.asl20;
65 maintainers = with maintainers; [ jonringer ];
66 };
67}