NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.06k stars 14.04k forks source link

xdg-mime can't set default because qtpaths is not found #338263

Open Jayden295 opened 2 months ago

Jayden295 commented 2 months ago

Describe the bug

When I try to set a default application using xdg-mime I get:

~ $ xdg-mime default appflowy.desktop x-scheme-handler/appflowy-flutter 
/run/current-system/sw/bin/xdg-mime: line 863: qtpaths: command not found

Steps To Reproduce

Steps to reproduce the behavior:

  1. Try to set a default app using xdg-mime (xdg-mime default desktopentry thing)
  2. See that it fails with qtpaths: command not found

Expected behavior

I expected it to set the URL scheme to appflowy

Additional context

I also tried it with different apps (xdg-mime default io.github.zen_browser.zen.desktop text/html) and it still doesn't work.

It seems to still set the application in .config/mimeapps.list though.

Notify maintainers

@edolstra

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

~ $ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.47-xanmod1, NixOS, 24.11 (Vicuna), 24.11.20240828.71e91c4`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/887hpp8a2i99n9jjwcvz6qkhhhqsvzkg-source`

Add a :+1: reaction to issues you find important.

eclairevoyant commented 2 months ago

Can't repro the error, seems like something specific to your config. Can you share it?

Jayden295 commented 2 months ago

Here are my dotfiles: https://codeberg.org/Ash882/NixOS_dotfiles

It seems that adding kdePackages.qtbase to my packages fixes it.

eclairevoyant commented 2 months ago

What's the output of realpath $(which xdg-mime)?

Jayden295 commented 2 months ago
~ $ realpath $(which xdg-mime) 
/nix/store/i1gp2kxzmpc5pl66023gmn0nax9b5jby-xdg-utils-1.2.1/bin/xdg-mime
ForkKILLET commented 4 days ago

Same, installing kdePackages.qtbase fixes it for me.