From dc58263f7abd0b3154f84e953cf58c40e91e61d6 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 20 Oct 2022 21:12:23 +0000 Subject: modules/weechat: pin to Python 3.9 Python 3.10 causes WeeChat to hang on exit due to a GIL bug. --- modules/workstation/weechat/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/workstation/weechat/default.nix b/modules/workstation/weechat/default.nix index c6698125d6ea..fb61b8c69ef2 100644 --- a/modules/workstation/weechat/default.nix +++ b/modules/workstation/weechat/default.nix @@ -3,7 +3,15 @@ with lib; let - scripts = with pkgs.weechatScripts; + weechatScripts = pkgs.weechatScripts.override { + python3Packages = pkgs.python39Packages; + }; + + weechatWrapper = with pkgs; wrapWeechat (weechat-unwrapped.override { + python3Packages = python39Packages; + }); + + scripts = with weechatScripts; [ colorize_nicks weechat-go weechat-matrix zncplayback ]; networks = [ @@ -111,7 +119,7 @@ let # to WeeChat before the /script loads, so scripts wouldn't be # available and we wouldn't be able to do stuff like set up Matrix. cfg = pkgs.runCommand "weechat-config" {} '' - ${pkgs.weechat.override { + ${weechatWrapper { configure = { ... }: { inherit scripts; init = concatStringsSep ";" (commands ++ [ "/save" "/exit" ]); @@ -129,7 +137,7 @@ in ''; environment.systemPackages = with pkgs; [ - (weechat.override { + (weechatWrapper { configure = { ...}: { inherit scripts; }; -- cgit 1.4.1