summary refs log tree commit diff
path: root/pkgs/applications/networking/irc/weechat/scripts
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2021-02-24 17:38:11 +0100
committerJörg Thalheim <joerg@thalheim.io>2021-02-24 18:04:36 +0100
commitc3ea33e72be5ce42b42cfd129e1b63caa33a9504 (patch)
tree04291422f9abe93093f0d71bd6d606a3aefa4ef3 /pkgs/applications/networking/irc/weechat/scripts
parentcc8ad48f0b62ef8bf6b538de76c1d1098fd0e199 (diff)
downloadnixpkgs-c3ea33e72be5ce42b42cfd129e1b63caa33a9504.tar
nixpkgs-c3ea33e72be5ce42b42cfd129e1b63caa33a9504.tar.gz
nixpkgs-c3ea33e72be5ce42b42cfd129e1b63caa33a9504.tar.bz2
nixpkgs-c3ea33e72be5ce42b42cfd129e1b63caa33a9504.tar.lz
nixpkgs-c3ea33e72be5ce42b42cfd129e1b63caa33a9504.tar.xz
nixpkgs-c3ea33e72be5ce42b42cfd129e1b63caa33a9504.tar.zst
nixpkgs-c3ea33e72be5ce42b42cfd129e1b63caa33a9504.zip
weechatScripts.wee-slack: 2.6.0 -> 2.7.0
Diffstat (limited to 'pkgs/applications/networking/irc/weechat/scripts')
-rw-r--r--pkgs/applications/networking/irc/weechat/scripts/wee-slack/0001-hardcode-json-file-path.patch35
-rw-r--r--pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix6
-rw-r--r--pkgs/applications/networking/irc/weechat/scripts/wee-slack/hardcode-json-file-path.patch12
3 files changed, 38 insertions, 15 deletions
diff --git a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/0001-hardcode-json-file-path.patch b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/0001-hardcode-json-file-path.patch
new file mode 100644
index 00000000000..45e620db258
--- /dev/null
+++ b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/0001-hardcode-json-file-path.patch
@@ -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
+
diff --git a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix
index 089271812a7..679e278c8a0 100644
--- a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix
+++ b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix
@@ -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 = ''
diff --git a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/hardcode-json-file-path.patch b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/hardcode-json-file-path.patch
deleted file mode 100644
index 7413a9229ce..00000000000
--- a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/hardcode-json-file-path.patch
+++ /dev/null
@@ -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.')