summary refs log tree commit diff
path: root/pkgs/applications/networking/irc/weechat/scripts/weechat-xmpp/default.nix
blob: dad5b9c5e02af4f9a5822830ef300d82c52905ed (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
{ stdenv, fetchFromGitHub, xmpppy, pydns, substituteAll, buildEnv }:

stdenv.mkDerivation {
  name = "weechat-jabber-2017-08-30";

  src = fetchFromGitHub {
    repo = "weechat-xmpp";
    owner = "sleduc";
    sha256 = "0s02xs0ynld9cxxzj07al364sfglyc5ir1i82133mq0s8cpphnxv";
    rev = "8f6c21f5a160c9318c7a2d8fd5dcac7ab2e0d843";
  };

  installPhase = ''
    mkdir -p $out/share
    cp jabber.py $out/share/jabber.py
  '';

  patches = [
    (substituteAll {
      src = ./libpath.patch;
      env = "${buildEnv {
        name = "weechat-xmpp-env";
        paths = [ pydns xmpppy ];
      }}/lib/python2.7/site-packages";
    })
  ];

  passthru.scripts = [ "jabber.py" ];

  meta = with stdenv.lib; {
    description = "A fork of the jabber plugin for weechat";
    homepage = "https://github.com/sleduc/weechat-xmpp";
    maintainers = with maintainers; [ ma27 ];
    license = licenses.gpl3Plus;
  };
}