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