git.iko.soy/typeable/nixpkgs
on master help sign in
weechatScripts.wee-slack: 2.6.0 -> 2.7.0
commitc3ea33e72be5ce42b42cfd129e1b63caa33a9504 authorJörg Thalheim <joerg@thalheim.io> dateWed 24 Feb 2021, 17:38 (6 years ago) parentcc8ad48
3 files changed+38−15
pkgs/applications/networking/irc/weechat/scripts/wee-slack/0001-hardcode-json-file-path.patch+35 pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix+3−3 pkgs/applications/networking/irc/weechat/scripts/wee-slack/hardcode-json-file-path.patch−12
pkgs/applications/networking/irc/weechat/scripts/wee-slack/0001-hardcode-json-file-path.patchnew file+35
@@ -0,0 +1,35 @@
1+From 5dd2593369645b11a9dc03e1930617d2f5dbd039 Mon Sep 17 00:00:00 2001
2+From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
3+Date: Wed, 11 Nov 2020 11:48:49 +0100
4+Subject: [PATCH] hardcode json file path
5+MIME-Version: 1.0
6+Content-Type: text/plain; charset=UTF-8
7+Content-Transfer-Encoding: 8bit
8+
9+Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
10+---
11+ wee_slack.py | 8 +-------
12+ 1 file changed, 1 insertion(+), 7 deletions(-)
13+
14+diff --git a/wee_slack.py b/wee_slack.py
15+index a3d779c..5942289 100644
16+--- a/wee_slack.py
17++++ b/wee_slack.py
18+@@ -5136,13 +5136,7 @@ def create_slack_debug_buffer():
19+
20+ def load_emoji():
21+ try:
22+- weechat_dir = w.info_get('weechat_dir', '')
23+- weechat_sharedir = w.info_get('weechat_sharedir', '')
24+- local_weemoji, global_weemoji = ('{}/weemoji.json'.format(path)
25+- for path in (weechat_dir, weechat_sharedir))
26+- path = (global_weemoji if os.path.exists(global_weemoji) and
27+- not os.path.exists(local_weemoji) else local_weemoji)
28+- with open(path, 'r') as ef:
29++ with open('@out@/share/wee-slack/weemoji.json', 'r') as ef:
30+ emojis = json.loads(ef.read())
31+ if 'emoji' in emojis:
32+ print_error('The weemoji.json file is in an old format. Please update it.')
33+--
34+2.29.0
35+
pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix+3−3
@@ -2,13 +2,13 @@
22
33stdenv.mkDerivation rec {
44 pname = "wee-slack";
5− version = "2.6.0";
5+ version = "2.7.0";
66
77 src = fetchFromGitHub {
88 repo = "wee-slack";
99 owner = "wee-slack";
1010 rev = "v${version}";
11− sha256 = "0s4qd1z40c1bczkvc840jwjmzbv7nyj06xqs1si9v54qmkh4gaq4";
11+ sha256 = "sha256-6Z/H15bKe0PKpNe9PCgc5mLOii3CILCAVon7EgzIkx8=";
1212 };
1313
1414 patches = [
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
1919 paths = with python3Packages; [ websocket_client six ];
2020 }}/${python3Packages.python.sitePackages}";
2121 })
22− ./hardcode-json-file-path.patch
22+ ./0001-hardcode-json-file-path.patch
2323 ];
2424
2525 postPatch = ''
pkgs/applications/networking/irc/weechat/scripts/wee-slack/hardcode-json-file-path.patchdeleted−12
@@ -1,12 +0,0 @@
1−--- a/wee_slack.py
2−+++ b/wee_slack.py
3−@@ -4560,8 +4560,7 @@
4−
5− def load_emoji():
6− try:
7−- DIR = w.info_get('weechat_dir', '')
8−- with open('{}/weemoji.json'.format(DIR), 'r') as ef:
9−+ with open('@out@/share/wee-slack/weemoji.json', 'r') as ef:
10− emojis = json.loads(ef.read())
11− if 'emoji' in emojis:
12− print_error('The weemoji.json file is in an old format. Please update it.')