depot/third_party/nixpkgs/pkgs/development/python-modules/docker/default.nix
Default email 5083ee08a2 Project import generated by Copybara.
GitOrigin-RevId: 10ecda252ce1b3b1d6403caeadbcc8f30d5ab796
2022-09-30 06:47:45 -05:00

60 lines
1.2 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pythonOlder
, packaging
, paramiko
, pytestCheckHook
, requests
, setuptools-scm
, urllib3
, websocket-client
}:
buildPythonPackage rec {
pname = "docker";
version = "6.0.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-GeMwRwr0AWfSk7A1JXjB+iLXSzTT7fXU/5DrwgO7svE=";
};
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
packaging
requests
urllib3
websocket-client
];
passthru.optional-dependencies.ssh = [
paramiko
];
checkInputs = [
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
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 [ "api_test" "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 ];
};
}