about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/paho-mqtt/default.nix
blob: bf7ebee56577ea6c9a26ef0c63e4a777b89c6b87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
, stdenv, 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;

  doCheck = !stdenv.isDarwin;

  meta = with lib; {
    homepage = https://eclipse.org/paho;
    description = "MQTT version 3.1.1 client class";
    license = licenses.epl10;
    maintainers = with maintainers; [ mog dotlambda ];
  };
}