2019-12-10 06:34:21 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27
|
2019-07-29 22:12:38 +01:00
|
|
|
, backports_ssl_match_hostname
|
|
|
|
, mock
|
|
|
|
, paramiko
|
|
|
|
, pytest
|
2019-12-10 06:34:21 +00:00
|
|
|
, pytestCheckHook
|
2019-07-29 22:12:38 +01:00
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, websocket_client
|
2017-01-27 10:32:28 +00:00
|
|
|
}:
|
2019-06-20 01:44:24 +01:00
|
|
|
|
2017-01-27 10:32:28 +00:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 10:25:35 +01:00
|
|
|
pname = "docker";
|
2020-02-13 21:03:39 +00:00
|
|
|
version = "4.2.0";
|
2017-01-27 10:32:28 +00:00
|
|
|
|
2018-02-26 07:14:56 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-02-13 21:03:39 +00:00
|
|
|
sha256 = "0bkj1xfp6mnvk1i9hl5awsmwi07q6iwwsjznd7kvrx5m19i6dbnx";
|
2017-01-27 10:32:28 +00:00
|
|
|
};
|
|
|
|
|
2019-12-10 06:34:21 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.optional isPy27 mock;
|
|
|
|
|
2017-01-27 10:32:28 +00:00
|
|
|
propagatedBuildInputs = [
|
2019-10-15 05:13:49 +01:00
|
|
|
paramiko
|
2017-05-07 11:55:45 +01:00
|
|
|
requests
|
2019-10-15 05:13:49 +01:00
|
|
|
six
|
2017-01-27 10:32:28 +00:00
|
|
|
websocket_client
|
2019-12-10 06:34:21 +00:00
|
|
|
] ++ lib.optional isPy27 backports_ssl_match_hostname;
|
2017-01-27 10:32:28 +00:00
|
|
|
|
2019-12-10 06:34:21 +00:00
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
2019-10-26 02:00:00 +01:00
|
|
|
# Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
|
2019-12-10 06:34:21 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [ "stream_response" "socket_file" ];
|
|
|
|
|
|
|
|
# skip setuptoolsCheckPhase
|
|
|
|
doCheck = false;
|
2017-01-27 10:32:28 +00:00
|
|
|
|
2019-12-10 06:34:21 +00:00
|
|
|
meta = with lib; {
|
2017-01-27 10:32:28 +00:00
|
|
|
description = "An API client for docker written in Python";
|
2019-10-15 05:13:49 +01:00
|
|
|
homepage = "https://github.com/docker/docker-py";
|
2017-01-27 10:32:28 +00:00
|
|
|
license = licenses.asl20;
|
2019-06-20 01:44:24 +01:00
|
|
|
maintainers = with maintainers; [ jonringer ];
|
2017-01-27 10:32:28 +00:00
|
|
|
};
|
|
|
|
}
|