about summary refs log tree commit diff
path: root/modules/workstation/weechat/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-10-20 21:12:23 +0000
committerAlyssa Ross <hi@alyssa.is>2022-10-20 21:13:22 +0000
commitdc58263f7abd0b3154f84e953cf58c40e91e61d6 (patch)
treed8c9b95ff88c7215359b95b4850c51c73b05d940 /modules/workstation/weechat/default.nix
parentab20a2a00b03f090099a8a5978bf6492e9242813 (diff)
downloadnixlib-dc58263f7abd0b3154f84e953cf58c40e91e61d6.tar
nixlib-dc58263f7abd0b3154f84e953cf58c40e91e61d6.tar.gz
nixlib-dc58263f7abd0b3154f84e953cf58c40e91e61d6.tar.bz2
nixlib-dc58263f7abd0b3154f84e953cf58c40e91e61d6.tar.lz
nixlib-dc58263f7abd0b3154f84e953cf58c40e91e61d6.tar.xz
nixlib-dc58263f7abd0b3154f84e953cf58c40e91e61d6.tar.zst
nixlib-dc58263f7abd0b3154f84e953cf58c40e91e61d6.zip
modules/weechat: pin to Python 3.9
Python 3.10 causes WeeChat to hang on exit due to a GIL bug.
Diffstat (limited to 'modules/workstation/weechat/default.nix')
-rw-r--r--modules/workstation/weechat/default.nix14
1 files 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;
       };