Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weechat-matrix script cannot find matrix_sso_helper binary #124186

Closed
arachnist opened this issue May 23, 2021 · 2 comments · Fixed by #124265
Closed

weechat-matrix script cannot find matrix_sso_helper binary #124186

arachnist opened this issue May 23, 2021 · 2 comments · Fixed by #124265

Comments

@arachnist
Copy link
Contributor

Describe the bug
weechat-matrix script cannot find the matrix_sso_helper helper binary that's used when logging in to matrix homeservers that require sso

To Reproduce

  1. Add an override to weechat to add weechat-matrix weechat script
    (self: super: {
      weechat = super.weechat.override {
        configure = { availablePlugins, ... }: {
          scripts = with super.weechatScripts; [ weechat-otr weechat-matrix multiline ];
        };
      };
    })
  1. Try logging in to a homeserver that requires SSO

Actual results
Weechat prints a message:

203055     weechat     │ stderr: Error with command 'matrix_sso_helper'

Expected behavior
weechat-matrix should print a link that user's supposed to click in browser

Notify maintainers
@tilpner @emilazy
@lovek323 @lheckemann

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.10.37, NixOS, 21.05pre291486.900115a4f7f (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.11
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: weechat weechatScripts.weechat-matrix
# a list of nixos modules affected by the problem
module:
@arachnist
Copy link
Contributor Author

I locally hacked an overlay that works by making the path to matrix_sso_binary static:

    (self: super: {
      weechatScripts.weechat-matrix = super.weechatScripts.weechat-matrix.overrideAttrs (oldAttrs: rec{
        postFixup = oldAttrs.postFixup + ''
          sed -i "s@\"matrix_sso_helper\"@\"$out/bin/matrix_sso_helper\"@" $out/lib/*/site-packages/matrix/server.py
        '';
      });
    })

@symphorien
Copy link
Member

This solution looks reasonable (replace the wildcard by the actual file name and use substituteInPlace instead of sed). Would you mind opening a PR fixing this?

wearemnr pushed a commit to wearemnr/nixpkgs that referenced this issue May 27, 2021
server.py tries to launch a matrix_sso_helper binary when connecting to
a homeserver that uses some SSO mechanism instead of plain login and
password, but doesn't have $out/bin in $PATH.

Using substituteInPlace to patch server.py so that the helper process is
started by using its actual filesystem location instead of relying on
$PATH.

Fixes: NixOS#124186
Lassulus pushed a commit to Lassulus/nixpkgs that referenced this issue Jun 13, 2021
server.py tries to launch a matrix_sso_helper binary when connecting to
a homeserver that uses some SSO mechanism instead of plain login and
password, but doesn't have $out/bin in $PATH.

Using substituteInPlace to patch server.py so that the helper process is
started by using its actual filesystem location instead of relying on
$PATH.

Fixes: NixOS#124186
(cherry picked from commit f7ccc5f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants