stable-v3 breaks xdg-open usage
Description
After updating my config to the stable-v3 branch, using xdg-open on links or files that use an installed flatpak does not work anymore.
The following error is thrown every time --- the following example is using Libreoffice to open a file on the ~/Downloads folder:
[user@hostname: ~/Downloads] $ xdg-open file.csv
error: While opening repository /home/<user>/Downloads/"/home/<user>/.local/share/flatpak"/repo: opening repo: opend
ir(/home/<user>/Downloads/"/home/<user>/.local/share/flatpak"/repo): No such file or directory
The error does not happen when using the stable branch.
The error is not triggered when using the flatpak binary directly (in this case, org.libreoffice.LibreOffice).
Here's the bash code for xdg-open when it's calling the flatpak:
/nix/store/<hash>-9.5/bin/env env 'FLATPAK_USER_DIR="/home/<user>/.local/share/flat
pak"' 'FLATPAK_SYSTEM_DIR="/home/<user>/.local/share/flatpak"' flatpak run --branch=stable --arch=<arch> --command=libreo
ffice --file-forwarding org.libreoffice.LibreOffice --calc @@u file.csv @@
Removing the FLATPAK_*_DIR variables from the call removes the error. So I think there's something going wrong with scr/script.nix when downloading/setting up the flatpaks.
Hmm I'm not sure what causes this to happen.
I decided to push a workaround to the dev branch... see if that does anything
Cheers
Thanks for the quick response.
I've tried the dev branch, however, its evaluation fails with the following message:
error: attribute 'fpkg' missing
at /nix/store/<hash>-source/src/options.nix:5:4:
4|
5| let
| ^
6| flatpak-types = callPackage ./lib/types/flatpak.nix {};
I think it is because fpkg and fremote are being inherited from ./src/lib/types/flatpak.nix, while they're defined and exposed by ./src/lib/types/regexes.nix.
Oops. Try again.
Tested both Steam and Libreoffice with the new commit and xdg-open is working.
I'll just go ahead and merge my changes into the stable-v3 branch...
I'm very puzzled, because the relevant code didn't change at all (besides the paths) between stable-v2 and stable-v3...
@in-a-dil-emma was there a regression between https://github.com/in-a-dil-emma/declarative-flatpak/issues/29#event-14168518500 (Sep 7, 2024) and https://github.com/in-a-dil-emma/declarative-flatpak/issues/29#event-14736728552 (Oct 19, 2024)?
If yes, has it been tried to use git bisect?
@in-a-dil-emma was there a regression between https://github.com/in-a-dil-emma/declarative-flatpak/issues/29#event-14168518500 (Sep 7, 2024) and https://github.com/in-a-dil-emma/declarative-flatpak/issues/29#event-14736728552 (Oct 19, 2024)?
If yes, has it been tried to use
git bisect?
There has been one, but it only appears when the module is told to use non-default flatpak locations. The problem is in the activation code where all the sed commands are
@in-a-dil-emma was there a regression between #29 (comment) (Sep 7, 2024) and #29 (comment) (Oct 19, 2024)?
If yes, has it been tried to use
git bisect?
I reopened this issue because the problem still exists, somewhere
Okay
I have tested opening Sober (Roblox for Linux) from Google Chrome, and it doesn't seem to work
Do you have logs?
@in-a-dil-emma
Do you have logs?
I will be able to test again later today, Do you know which log I should provide you? What's on screen is simply Roblox's web UI saying it is opening the desktop app but nothing happens, even when Sober is already open
Note that I am using Google Chrome from nixpkgs and Sober from flatpak's flathub