2021-03-12 07:09:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, backports_ssl_match_hostname
|
|
|
|
, mock
|
|
|
|
, paramiko
|
|
|
|
, pytestCheckHook
|
|
|
|
, requests
|
|
|
|
, six
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "docker";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "5.0.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "d916a26b62970e7c2f554110ed6af04c7ccff8e9f81ad17d0d40c75637e227fb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optional isPy27 mock;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
paramiko
|
|
|
|
requests
|
|
|
|
six
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optional isPy27 backports_ssl_match_hostname;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
2021-03-12 07:09:13 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
|
2021-03-12 07:09:13 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [ "api_test" "stream_response" "socket_file" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An API client for docker written in Python";
|
|
|
|
homepage = "https://github.com/docker/docker-py";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|