Merge pull request #83339 from bdesham/wee-slack-2.5.0

weechatScripts.wee-slack: 2.4.0 -> 2.5.0

authored by

Jörg Thalheim and committed by
GitHub
c7fc0ed3 1de505db

+20 -2
+8 -2
pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix
··· 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "wee-slack"; 5 - version = "2.4.0"; 5 + version = "2.5.0"; 6 6 7 7 src = fetchFromGitHub { 8 8 repo = "wee-slack"; 9 9 owner = "wee-slack"; 10 10 rev = "v${version}"; 11 - sha256 = "0h425ln5vv76zv41dccapyfbl8qmmflbpwmrd26knqyj8k24zfpr"; 11 + sha256 = "0sxgi5fg8qvzqmxy7sdma6v0wj93xwh21av10n8nxvdskacw5dxz"; 12 12 }; 13 13 14 14 patches = [ ··· 19 19 paths = with python3Packages; [ websocket_client six ]; 20 20 }}/${python3Packages.python.sitePackages}"; 21 21 }) 22 + ./hardcode-json-file-path.patch 22 23 ]; 23 24 25 + postPatch = '' 26 + substituteInPlace wee_slack.py --subst-var out 27 + ''; 28 + 24 29 passthru.scripts = [ "wee_slack.py" ]; 25 30 26 31 installPhase = '' 27 32 mkdir -p $out/share 28 33 cp wee_slack.py $out/share/wee_slack.py 34 + install -D -m 0444 weemoji.json $out/share/wee-slack/weemoji.json 29 35 ''; 30 36 31 37 meta = with stdenv.lib; {
+12
pkgs/applications/networking/irc/weechat/scripts/wee-slack/hardcode-json-file-path.patch
··· 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.')