nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix

32 lines
819 B
Nix
Raw Normal View History

2018-10-17 14:24:34 +00:00
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
, stdenv, pytest-runner, pytest, mock }:
2018-10-17 14:24:34 +00:00
buildPythonPackage rec {
pname = "paho-mqtt";
version = "1.5.1";
2018-10-17 14:24:34 +00:00
# No tests in PyPI tarball
src = fetchFromGitHub {
owner = "eclipse";
repo = "paho.mqtt.python";
rev = "v${version}";
sha256 = "1y537i6zxkjkmi80w5rvd18npz1jm5246i2x8p3q7ycx94i8ixs0";
2018-10-17 14:24:34 +00:00
};
postPatch = ''
substituteInPlace setup.py --replace "pylama" ""
substituteInPlace setup.cfg --replace "--pylama" ""
'';
checkInputs = [ pytest-runner pytest ] ++ lib.optional (!isPy3k) mock;
2018-10-17 14:24:34 +00:00
doCheck = !stdenv.isDarwin;
2018-10-17 14:24:34 +00:00
meta = with lib; {
homepage = "https://eclipse.org/paho";
2018-10-17 14:24:34 +00:00
description = "MQTT version 3.1.1 client class";
license = licenses.epl10;
maintainers = with maintainers; [ mog dotlambda ];
};
}