2020-04-24 23:36:52 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27
|
|
|
|
, backports_ssl_match_hostname
|
|
|
|
, mock
|
|
|
|
, paramiko
|
|
|
|
, pytest
|
|
|
|
, pytestCheckHook
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, websocket_client
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "docker";
|
2021-01-15 22:18:51 +00:00
|
|
|
version = "4.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-01-15 22:18:51 +00:00
|
|
|
sha256 = "sha256-BgSnRxnV0t5Dh1OTS3Vb/NpvYvSbjkswlppLCiqKEiA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optional isPy27 mock;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
paramiko
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
websocket_client
|
|
|
|
] ++ lib.optional isPy27 backports_ssl_match_hostname;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
|
|
|
# Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
|
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [ "stream_response" "socket_file" ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|