3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix
2020-05-09 12:35:31 +01:00

46 lines
1.2 KiB
Nix

{ stdenv, substituteAll, buildEnv, fetchFromGitHub, python3Packages }:
stdenv.mkDerivation rec {
pname = "wee-slack";
version = "2.6.0";
src = fetchFromGitHub {
repo = "wee-slack";
owner = "wee-slack";
rev = "v${version}";
sha256 = "0s4qd1z40c1bczkvc840jwjmzbv7nyj06xqs1si9v54qmkh4gaq4";
};
patches = [
(substituteAll {
src = ./libpath.patch;
env = "${buildEnv {
name = "wee-slack-env";
paths = with python3Packages; [ websocket_client six ];
}}/${python3Packages.python.sitePackages}";
})
./hardcode-json-file-path.patch
];
postPatch = ''
substituteInPlace wee_slack.py --subst-var out
'';
passthru.scripts = [ "wee_slack.py" ];
installPhase = ''
mkdir -p $out/share
cp wee_slack.py $out/share/wee_slack.py
install -D -m 0444 weemoji.json $out/share/wee-slack/weemoji.json
'';
meta = with stdenv.lib; {
homepage = "https://github.com/wee-slack/wee-slack";
license = licenses.mit;
maintainers = with maintainers; [ willibutz ];
description = ''
A WeeChat plugin for Slack.com. Synchronizes read markers, provides typing notification, search, etc..
'';
};
}