weechatScripts.wee-slack: 2.6.0 -> 2.7.0
This commit is contained in:
parent
cc8ad48f0b
commit
c3ea33e72b
3 changed files with 38 additions and 15 deletions
|
@ -0,0 +1,35 @@
|
|||
From 5dd2593369645b11a9dc03e1930617d2f5dbd039 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
||||
Date: Wed, 11 Nov 2020 11:48:49 +0100
|
||||
Subject: [PATCH] hardcode json file path
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
|
||||
---
|
||||
wee_slack.py | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git a/wee_slack.py b/wee_slack.py
|
||||
index a3d779c..5942289 100644
|
||||
--- a/wee_slack.py
|
||||
+++ b/wee_slack.py
|
||||
@@ -5136,13 +5136,7 @@ def create_slack_debug_buffer():
|
||||
|
||||
def load_emoji():
|
||||
try:
|
||||
- weechat_dir = w.info_get('weechat_dir', '')
|
||||
- weechat_sharedir = w.info_get('weechat_sharedir', '')
|
||||
- local_weemoji, global_weemoji = ('{}/weemoji.json'.format(path)
|
||||
- for path in (weechat_dir, weechat_sharedir))
|
||||
- path = (global_weemoji if os.path.exists(global_weemoji) and
|
||||
- not os.path.exists(local_weemoji) else local_weemoji)
|
||||
- with open(path, 'r') as ef:
|
||||
+ with open('@out@/share/wee-slack/weemoji.json', 'r') as ef:
|
||||
emojis = json.loads(ef.read())
|
||||
if 'emoji' in emojis:
|
||||
print_error('The weemoji.json file is in an old format. Please update it.')
|
||||
--
|
||||
2.29.0
|
||||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wee-slack";
|
||||
version = "2.6.0";
|
||||
version = "2.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "wee-slack";
|
||||
owner = "wee-slack";
|
||||
rev = "v${version}";
|
||||
sha256 = "0s4qd1z40c1bczkvc840jwjmzbv7nyj06xqs1si9v54qmkh4gaq4";
|
||||
sha256 = "sha256-6Z/H15bKe0PKpNe9PCgc5mLOii3CILCAVon7EgzIkx8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||
paths = with python3Packages; [ websocket_client six ];
|
||||
}}/${python3Packages.python.sitePackages}";
|
||||
})
|
||||
./hardcode-json-file-path.patch
|
||||
./0001-hardcode-json-file-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
--- a/wee_slack.py
|
||||
+++ b/wee_slack.py
|
||||
@@ -4560,8 +4560,7 @@
|
||||
|
||||
def load_emoji():
|
||||
try:
|
||||
- DIR = w.info_get('weechat_dir', '')
|
||||
- with open('{}/weemoji.json'.format(DIR), 'r') as ef:
|
||||
+ with open('@out@/share/wee-slack/weemoji.json', 'r') as ef:
|
||||
emojis = json.loads(ef.read())
|
||||
if 'emoji' in emojis:
|
||||
print_error('The weemoji.json file is in an old format. Please update it.')
|
Loading…
Reference in a new issue