nix-community / nix-snapd

Snap package for Nix and NixOS
MIT License
30 stars 2 forks source link

xdg-open support? #8

Open postsolar opened 1 month ago

postsolar commented 1 month ago

Thank you for working on this flake! I have an issue with xdg-open not working, or at least I suspect it's the cause. I was trying to use transitionsdj, but can't connect my soundcloud account because the browser wouldn't open. The error I'm getting is

user-open error: cannot open supplied URL

I believe the cause is that it uses xdg-open under the hood. Verifying it manually:

$ snap run --shell transitionsdj
bash-5.0$ xdg-open https://google.com
user-open error: cannot open supplied URL

It works fine outside of the snap.

io12 commented 1 month ago

This should be fixed after https://github.com/io12/nix-snapd/commit/d87a58cc9880bf81560d7a2b7be3635ed7e71866. Let me know if it works now. Thanks!

postsolar commented 1 month ago

Doesn't seem to be helping. I've done:

But xdg-open <url> still doesn't work. Maybe something else is required to properly update?

io12 commented 1 month ago

Have you tried rebooting?

postsolar commented 1 month ago

Yep, still no effect. Just for clarity, does it work for you with these commands?

$ sudo snap install hello-world
$ snap run --shell hello-world
bash-4.3$ xdg-open https://google.com
io12 commented 1 month ago

Just for clarity, does it work for you with these commands?

Yes, with Firefox in environment.systemPackages it runs Firefox. I'm building your config now to see if I can reproduce the issue.

io12 commented 1 month ago

I couldn't reproduce the issue with your config. Running those commands opened google.com in firefox-developer-edition. I did have to replace hyprland with GNOME, because there was an error with hyprland.

error: hash mismatch in fixed-output derivation '/nix/store/qj0acgvhk1gdipfvsdiqskn86hv8s2ry-focus-by-keyboard...outfoxxed-3Ahy3-3Amaster.patch.drv':
         specified: sha256-JtgdilIZLLGFlw9ROCD6uoUd7KBa9HWDBmzrouP06p0=
            got:    sha256-4aQKB4fhfmK/fYXZtrzXZ4blnhZD8S8SczNdS1+GkbM=

After changing the hash, the patch fails to apply.