2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
2024-06-20 14:57:18 +00:00
|
|
|
fetchFromGitHub,
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonOlder,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
2024-06-20 14:57:18 +00:00
|
|
|
hatchling,
|
|
|
|
hatch-vcs,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
packaging,
|
|
|
|
requests,
|
|
|
|
urllib3,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# optional-dependenices
|
|
|
|
paramiko,
|
|
|
|
websocket-client,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "docker";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "7.1.0";
|
|
|
|
pyproject = true;
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "docker";
|
|
|
|
repo = "docker-py";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-sk6TZLek+fRkKq7kG9g6cR9lvfPC8v8qUXKb7Tq4pLU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
build-system = [
|
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
dependencies = [
|
2022-09-30 11:47:45 +00:00
|
|
|
packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
2022-09-30 11:47:45 +00:00
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
ssh = [ paramiko ];
|
2024-06-20 14:57:18 +00:00
|
|
|
tls = [];
|
2024-06-05 15:53:02 +00:00
|
|
|
websockets = [ websocket-client ];
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "docker" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
pytestCheckHook
|
2024-06-20 14:57:18 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
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
|
2022-11-21 17:40:18 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
2024-01-13 08:15:51 +00:00
|
|
|
"api_test"
|
|
|
|
"stream_response"
|
|
|
|
"socket_file"
|
2022-11-21 17:40:18 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/docker/docker-py/releases/tag/${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "API client for docker written in Python";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/docker/docker-py";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|