2021-03-08 21:52:46 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-09-14 21:36:07 +00:00
|
|
|
, pythonOlder
|
|
|
|
, packaging
|
2019-07-29 21:12:38 +00:00
|
|
|
, paramiko
|
2019-12-10 06:34:21 +00:00
|
|
|
, pytestCheckHook
|
2019-07-29 21:12:38 +00:00
|
|
|
, requests
|
2022-09-25 18:38:13 +00:00
|
|
|
, setuptools-scm
|
2022-09-14 21:36:07 +00:00
|
|
|
, urllib3
|
2021-06-15 11:12:45 +00:00
|
|
|
, websocket-client
|
2017-01-27 10:32:28 +00:00
|
|
|
}:
|
2019-06-20 00:44:24 +00:00
|
|
|
|
2017-01-27 10:32:28 +00:00
|
|
|
buildPythonPackage rec {
|
2017-05-27 09:25:35 +00:00
|
|
|
pname = "docker";
|
2022-11-07 13:27:49 +00:00
|
|
|
version = "6.0.1";
|
2022-09-14 21:36:07 +00:00
|
|
|
format = "pyproject";
|
2022-11-07 13:27:49 +00:00
|
|
|
|
2022-09-14 21:36:07 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2017-01-27 10:32:28 +00:00
|
|
|
|
2018-02-26 07:14:56 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-11-07 13:27:49 +00:00
|
|
|
hash = "sha256-iWxCguXHr1xF6LaDsLDDOTKXT+blD8aQagqDYWqz2pc=";
|
2017-01-27 10:32:28 +00:00
|
|
|
};
|
|
|
|
|
2022-09-14 21:36:07 +00:00
|
|
|
nativeBuildInputs = [
|
2022-09-25 18:38:13 +00:00
|
|
|
setuptools-scm
|
2022-09-14 21:36:07 +00:00
|
|
|
];
|
2019-12-10 06:34:21 +00:00
|
|
|
|
2017-01-27 10:32:28 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-09-14 21:36:07 +00:00
|
|
|
packaging
|
2017-05-07 10:55:45 +00:00
|
|
|
requests
|
2022-09-14 21:36:07 +00:00
|
|
|
urllib3
|
2021-06-15 11:12:45 +00:00
|
|
|
websocket-client
|
2022-09-14 21:36:07 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies.ssh = [
|
|
|
|
paramiko
|
|
|
|
];
|
2017-01-27 10:32:28 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2020-03-30 04:29:31 +00:00
|
|
|
pytestCheckHook
|
2022-09-14 21:36:07 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2020-03-30 04:29:31 +00:00
|
|
|
|
2022-09-14 21:36:07 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests/unit"
|
|
|
|
];
|
2021-03-08 21:52:46 +00:00
|
|
|
|
2019-10-26 01:00:00 +00:00
|
|
|
# Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
|
2022-11-07 13:27:49 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
"api_test" "stream_response" "socket_file"
|
|
|
|
];
|
2019-12-10 06:34:21 +00:00
|
|
|
|
2020-03-30 04:29:31 +00:00
|
|
|
dontUseSetuptoolsCheck = true;
|
2017-01-27 10:32:28 +00:00
|
|
|
|
2022-11-07 13:27:49 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"docker"
|
|
|
|
];
|
|
|
|
|
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 04:13:49 +00:00
|
|
|
homepage = "https://github.com/docker/docker-py";
|
2017-01-27 10:32:28 +00:00
|
|
|
license = licenses.asl20;
|
2019-06-20 00:44:24 +00:00
|
|
|
maintainers = with maintainers; [ jonringer ];
|
2017-01-27 10:32:28 +00:00
|
|
|
};
|
|
|
|
}
|