weechatScripts.wee-slack: 2.1.1 => 2.2.0

This commit is contained in:
Franz Pletz 2018-11-16 00:29:48 +01:00
parent 9756e6bc74
commit 31bd0df53d
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4
3 changed files with 29 additions and 4 deletions

View File

@ -9,5 +9,7 @@
inherit (luaPackages) cjson; inherit (luaPackages) cjson;
}; };
wee-slack = callPackage ./wee-slack { }; wee-slack = callPackage ./wee-slack {
inherit pythonPackages;
};
} }

View File

@ -1,16 +1,26 @@
{ stdenv, fetchFromGitHub }: { stdenv, substituteAll, buildEnv, fetchFromGitHub, pythonPackages }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "wee-slack-${version}"; name = "wee-slack-${version}";
version = "2.1.1"; version = "2.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
repo = "wee-slack"; repo = "wee-slack";
owner = "wee-slack"; owner = "wee-slack";
rev = "v${version}"; rev = "v${version}";
sha256 = "05caackz645aw6kljmiihiy7xz9jld8b9blwpmh0cnaihavgj1wc"; sha256 = "1iy70q630cgs7fvk2151fq9519dwxrlqq862sbrwypzr6na6yqpg";
}; };
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" ]; passthru.scripts = [ "wee_slack.py" ];
installPhase = '' installPhase = ''

View File

@ -0,0 +1,13 @@
diff --git a/wee_slack.py b/wee_slack.py
index c5c7bc6..23fef2f 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -25,6 +25,8 @@ try:
except:
from StringIO import StringIO
+sys.path.append('@env@')
+
from websocket import create_connection, WebSocketConnectionClosedException
# hack to make tests possible.. better way?