about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix
blob: de7974d4cbe38c41a2d5a00dd07393b8d281b6bc (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
{ stdenv, substituteAll, buildEnv, fetchFromGitHub, pythonPackages }:

stdenv.mkDerivation rec {
  name = "wee-slack-${version}";
  version = "2.3.0";

  src = fetchFromGitHub {
    repo = "wee-slack";
    owner = "wee-slack";
    rev = "v${version}";
    sha256 = "0544j6vqbvb2xshq7ma2a3apx2vvpgfg3jh5prg265wnh4991nsw";
  };

  patches = [
    (substituteAll {
      src = ./libpath.patch;
      env = "${buildEnv {
        name = "wee-slack-env";
        paths = with pythonPackages; [ websocket_client six ];
      }}/${pythonPackages.python.sitePackages}";
    })
  ];

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

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

  meta = with stdenv.lib; {
    homepage = https://github.com/wee-slack/wee-slack;
    license = licenses.mit;
    maintainers = with maintainers; [ ma27 ];
    description = ''
      A WeeChat plugin for Slack.com. Synchronizes read markers, provides typing notification, search, etc..
    '';
  };
}