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

albert is not working: no result for queries #23710

Closed
romildo opened this issue Mar 10, 2017 · 6 comments
Closed

albert is not working: no result for queries #23710

romildo opened this issue Mar 10, 2017 · 6 comments

Comments

@romildo
Copy link
Contributor

romildo commented Mar 10, 2017

Issue description

Latest versions of Albert is not working as expected in NixOS. The latest one that works is version 0.8.11.

I have also opened an issue in albert's repository: albertlauncher/albert#397

albert

Steps to reproduce

Open albert (using a hotkey or from the system tray icon) and type a query in the input box. A list of applications should be shown so that the user could choose one to be executed. But no result is appearing.

Albert's github page has an animated image demonstrating how it would work.

Technical details

  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
    17.09pre102667.2839b10 (Hummingbird)

  • Nix version: (run nix-env --version)
    nix-env (Nix) 1.11.7

  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
    "17.09pre102667.2839b10"

@PierreR
Copy link
Contributor

PierreR commented Mar 10, 2017

I have the same issue.

It does seem to work if I pass the location path of the plugin directory manually:

 albert -p /nix/store/282n5p1ic2ia5gdagl1swkyv8gm40mlp-albert-0.9.3/lib/albert/plugins/

@PierreR
Copy link
Contributor

PierreR commented Mar 10, 2017

@ericsagnes do you know of any trick that could be used in default.nix to get a 'wrapper' that would set the plugin path automatically ?

@ericsagnes
Copy link
Contributor

Upstream is looking for plugins in hardcoded paths.
This is indeed not working well in nix case as albert plugins are in the nix store.
A workaround could be to use makeWrapper/wrapQtProgram to automatically set the plugin path with -p as you pointed like:

wrapQtProgram $out/bin/albert --add-flags "-p $out/lib/albert/plugins/"

@PierreR
Copy link
Contributor

PierreR commented Mar 11, 2017

@ericsagnes Thanks. I have just PR the suggested change. It works nicely.

@ericsagnes
Copy link
Contributor

Nice! But be aware that this is more a workaround than a real fix, as using the -p flag with the PR version will override the one passed in --add-flags and shadow the default plugins.

Ideally, this should be adressed upstream by providing a more flexible way to point plugins like a dedicated environment variable.

@romildo
Copy link
Contributor Author

romildo commented Mar 11, 2017

It would be better to modify albert source code to add the plugins directory (in the store location for albert) to the list of directories used to search plugins.

With the following snippet of code added to default.nix, albert works, without the need to use the -p command line option.

  postPatch = ''
    sed -i "/QStringList dirs = {/a    \"$out/lib\"," \
      src/lib/albert/src/pluginsystem/extensionmanager.cpp
  '';

@romildo romildo mentioned this issue Mar 11, 2017
7 tasks
7c6f434c added a commit that referenced this issue Mar 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants