1{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27
2, backports_ssl_match_hostname
3, mock
4, paramiko
5, pytest
6, pytestCheckHook
7, requests
8, six
9, websocket_client
10}:
11
12buildPythonPackage rec {
13 pname = "docker";
14 version = "4.3.1";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "bad94b8dd001a8a4af19ce4becc17f41b09f228173ffe6a4e0355389eef142f2";
19 };
20
21 nativeBuildInputs = lib.optional isPy27 mock;
22
23 propagatedBuildInputs = [
24 paramiko
25 requests
26 six
27 websocket_client
28 ] ++ lib.optional isPy27 backports_ssl_match_hostname;
29
30 checkInputs = [
31 pytestCheckHook
32 ];
33
34 pytestFlagsArray = [ "tests/unit" ];
35 # Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
36 disabledTests = lib.optionals stdenv.isDarwin [ "stream_response" "socket_file" ];
37
38 dontUseSetuptoolsCheck = true;
39
40 meta = with lib; {
41 description = "An API client for docker written in Python";
42 homepage = "https://github.com/docker/docker-py";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ jonringer ];
45 };
46}