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

39 lines
846 B
Nix
Raw Normal View History

2019-06-19 17:44:24 -07:00
{ stdenv, buildPythonPackage, fetchPypi, isPy27
, six, requests, websocket_client, mock, pytest
, paramiko, backports_ssl_match_hostname
2017-01-27 02:32:28 -08:00
}:
2019-06-19 17:44:24 -07:00
2017-01-27 02:32:28 -08:00
buildPythonPackage rec {
2019-06-19 17:44:24 -07:00
version = "4.0.1";
pname = "docker";
2017-01-27 02:32:28 -08:00
src = fetchPypi {
inherit pname version;
2019-06-19 17:44:24 -07:00
sha256 = "1284sqy3r6nxyz43vrpzqf25hsidpr0v4cgnbvavg2dl47bkf77n";
2017-01-27 02:32:28 -08:00
};
propagatedBuildInputs = [
six
requests
2017-01-27 02:32:28 -08:00
websocket_client
2019-06-19 17:44:24 -07:00
paramiko
] ++ stdenv.lib.optional isPy27 backports_ssl_match_hostname;
checkInputs = [
mock
pytest
2017-01-27 02:32:28 -08:00
];
2019-06-19 17:44:24 -07:00
# Other tests touch network
checkPhase = ''
${pytest}/bin/pytest tests/unit/
'';
2017-01-27 02:32:28 -08:00
meta = with stdenv.lib; {
description = "An API client for docker written in Python";
homepage = https://github.com/docker/docker-py;
license = licenses.asl20;
2019-06-19 17:44:24 -07:00
maintainers = with maintainers; [ jonringer ];
2017-01-27 02:32:28 -08:00
};
}