git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #83339 from bdesham/wee-slack-2.5.0

weechatScripts.wee-slack: 2.4.0 -> 2.5.0

commitc7fc0ed352091fcb45e1a8e120c3c99b7f47faea authorJörg Thalheim <Mic92@users.noreply.github.com> dateThu 26 Mar 2020, 07:22 (7 years ago) parent1de505da2d9581
2 files changed+20−2
pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix+8−2 pkgs/applications/networking/irc/weechat/scripts/wee-slack/hardcode-json-file-path.patch+12
pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix+8−2
@@ -2,13 +2,13 @@
22
33stdenv.mkDerivation rec {
44 pname = "wee-slack";
5− version = "2.4.0";
5+ version = "2.5.0";
66
77 src = fetchFromGitHub {
88 repo = "wee-slack";
99 owner = "wee-slack";
1010 rev = "v${version}";
11− sha256 = "0h425ln5vv76zv41dccapyfbl8qmmflbpwmrd26knqyj8k24zfpr";
11+ sha256 = "0sxgi5fg8qvzqmxy7sdma6v0wj93xwh21av10n8nxvdskacw5dxz";
1212 };
1313
1414 patches = [
@@ -19,13 +19,19 @@ stdenv.mkDerivation rec {
1919 paths = with python3Packages; [ websocket_client six ];
2020 }}/${python3Packages.python.sitePackages}";
2121 })
22+ ./hardcode-json-file-path.patch
2223 ];
2324
25+ postPatch = ''
26+ substituteInPlace wee_slack.py --subst-var out
27+ '';
28+
2429 passthru.scripts = [ "wee_slack.py" ];
2530
2631 installPhase = ''
2732 mkdir -p $out/share
2833 cp wee_slack.py $out/share/wee_slack.py
34+ install -D -m 0444 weemoji.json $out/share/wee-slack/weemoji.json
2935 '';
3036
3137 meta = with stdenv.lib; {
pkgs/applications/networking/irc/weechat/scripts/wee-slack/hardcode-json-file-path.patchnew file+12
@@ -0,0 +1,12 @@
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.')