diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix b/nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix new file mode 100644 index 000000000000..d58b31ffc04b --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix @@ -0,0 +1,29 @@ +{ lib, buildPythonPackage, fetchFromGitHub, isPy3k +, pytestrunner, pytest, mock }: + +buildPythonPackage rec { + pname = "paho-mqtt"; + version = "1.4.0"; + + # No tests in PyPI tarball + src = fetchFromGitHub { + owner = "eclipse"; + repo = "paho.mqtt.python"; + rev = "v${version}"; + sha256 = "1xg9ppz2lqacd9prsrx93q2wfkjjyla03xlfw74aj1alz9ki5hrs"; + }; + + postPatch = '' + substituteInPlace setup.py --replace "pylama" "" + substituteInPlace setup.cfg --replace "--pylama" "" + ''; + + checkInputs = [ pytestrunner pytest ] ++ lib.optional (!isPy3k) mock; + + meta = with lib; { + homepage = https://eclipse.org/paho; + description = "MQTT version 3.1.1 client class"; + license = licenses.epl10; + maintainers = with maintainers; [ mog dotlambda ]; + }; +} |