about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/errbot/default.nix
blob: 402017e129d69a4cdf13676ce4e088832385daef (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib, fetchFromGitHub, python, glibcLocales }:

let
  # errbot requires markdown<3, and is not compatible with it either.
  py = python.override {
    packageOverrides = self: super: {
      markdown = super.markdown.overridePythonAttrs (oldAttrs: rec {
        version = "2.6.11";
        src = super.fetchPypi {
          pname = "Markdown";
          inherit version;
          sha256 = "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8";
        };
      });
    };
  };

in
py.pkgs.buildPythonApplication rec {
  pname = "errbot";
  version = "6.1.1";

  src = fetchFromGitHub {
    owner = "errbotio";
    repo = "errbot";
    rev = version;
    sha256 = "1s4dl1za5imwsv6j3y7m47dy91hmqd5n221kkqm9ni4mpzgpffz0";
  };

  LC_ALL = "en_US.utf8";

  buildInputs = [ glibcLocales ];
  propagatedBuildInputs = with py.pkgs; [
    webtest requests jinja2 flask dulwich
    pyopenssl colorlog markdown ansi pygments
    daemonize pygments-markdown-lexer telegram irc slackclient
    sleekxmpp pyasn1 pyasn1-modules hypchat
  ];

  checkInputs = with py.pkgs; [ mock pytest ];
  # avoid tests that do network calls
  checkPhase = ''
    pytest tests -k 'not backup and not broken_plugin and not plugin_cycle'
  '';

  meta = with lib; {
    description = "Chatbot designed to be simple to extend with plugins written in Python";
    homepage = http://errbot.io/;
    maintainers = with maintainers; [ fpletz globin ];
    license = licenses.gpl3;
    platforms = platforms.unix;
  };
}