weechatScripts.weechat-matrix: fix PYTHONPATH

matrix.py tries to import its dependencies, and its own code from
$out/${python.sitePackages}, and neither of these worked because
nothing was telling Python where to load that stuff from.

Using patchPythonScript made it so matrix.py could find its
dependencies, but it still wasn't able to find its own code, so that
had to be added to program_PYTHONPATH beforehand so patchPythonScript
would include it as well.

Fixes: https://github.com/NixOS/nixpkgs/issues/89499
wip/yesman
Alyssa Ross 3 years ago
parent 410bbd828c
commit cfa16434c2
  1. 4
      pkgs/applications/networking/irc/weechat/scripts/weechat-matrix/default.nix

@ -70,6 +70,10 @@ in buildPythonPackage {
'';
dontPatchShebangs = true;
postFixup = ''
addToSearchPath program_PYTHONPATH $out/${python.sitePackages}
patchPythonScript $out/share/matrix.py
'';
meta = with lib; {
description = "A Python plugin for Weechat that lets Weechat communicate over the Matrix protocol";

Loading…
Cancel
Save