nixpkgs/pkgs/development/python-modules/docker/default.nix

45 lines
1 KiB
Nix
Raw Normal View History

2019-06-20 02:44:24 +02:00
{ stdenv, buildPythonPackage, fetchPypi, isPy27
2019-07-29 23:12:38 +02:00
, backports_ssl_match_hostname
, mock
, paramiko
, pytest
, 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 {
pname = "docker";
2019-10-15 06:13:49 +02:00
version = "4.1.0";
2017-01-27 11:32:28 +01:00
src = fetchPypi {
inherit pname version;
2019-10-15 06:13:49 +02:00
sha256 = "1hdgics03fz2fbhalzys7a7kjj54jnl5a37h6lzdgym41gkwa1kf";
2017-01-27 11:32:28 +01:00
};
propagatedBuildInputs = [
2019-10-15 06:13:49 +02:00
paramiko
requests
2019-10-15 06:13:49 +02:00
six
2017-01-27 11:32:28 +01:00
websocket_client
2019-06-20 02:44:24 +02:00
] ++ stdenv.lib.optional isPy27 backports_ssl_match_hostname;
checkInputs = [
mock
pytest
2017-01-27 11:32:28 +01:00
];
2019-06-20 02:44:24 +02:00
# Other tests touch network
# Deselect socket tests on Darwin because it hits the path length limit for a Unix domain socket
2019-06-20 02:44:24 +02:00
checkPhase = ''
${pytest}/bin/pytest tests/unit/ ${stdenv.lib.optionalString stdenv.isDarwin "--deselect=tests/unit/api_test.py::TCPSocketStreamTest"}
2019-06-20 02:44:24 +02:00
'';
2017-01-27 11:32:28 +01:00
meta = with stdenv.lib; {
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
};
}