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

Package for flatpak #2080

Open
3 tasks done
lihaohong6 opened this issue Dec 22, 2024 · 7 comments
Open
3 tasks done

Package for flatpak #2080

lihaohong6 opened this issue Dec 22, 2024 · 7 comments
Labels
feature New feature request

Comments

@lihaohong6
Copy link

yazi --debug output

N/A

Please describe the problem you're trying to solve

The application is not available in lots of distributions. Having it packaged with flatpak would make it easier to install. #1631 already discussed trying flatpak with no progress being made.

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

I already have a working draft in https://github.com/lihaohong6/flathub/tree/yazi-submission. After running flatpak-builder --force-clean --user --install builddir io.github.yazi-rs.yml, I am able to launch Yazi and browse my files.

No dependencies are packaged right now, so lots of features such as image/video/pdf previews and zoxide support don't work. I'll slowly work on adding these. Help would be appreciated because the worst case scenario is that all dependencies must be built as well.

Additional context

No response

Checklist

  • I have searched the existing issues/discussions
  • The latest nightly build doesn't already have this feature
@lihaohong6 lihaohong6 added the feature New feature request label Dec 22, 2024
@lihaohong6
Copy link
Author

@DevelSSN You might be interested in working on this since you opened the original issue about snap. I already have a working version packaged with flatpak-builder, but more work is needed to ship Yazi with all its optional features.

@DevelSSN
Copy link

DevelSSN commented Dec 22, 2024 via email

@lihaohong6
Copy link
Author

@peter Li Am happy to do so Will take it from the repo and try it out Also will learn a bit of meson

Meson is not a requirement for Rust projects. Lots of guides use it because of its convenience in building Rust+GTK applications, but you could also do a plain old cargo build and then manually install the binaries.

I added a few more libraries in the mean time. poppler, 7zip, zoxide, fd, rg, imagemagick, and jq are all included now. Packaging these libraries was not as hard as I thought, and I can probably include all recommended packages soon. There will still be lots of needs for testing, though, since I haven't tested a lot of advanced features, which may require extra permissions or config files located in an unusual spot due to flatpak's sandboxing.

@DevelSSN
Copy link

DevelSSN commented Dec 23, 2024 via email

@lihaohong6
Copy link
Author

lihaohong6 commented Dec 23, 2024

I got all the dependencies packaged. All preview types that are supported out of the box are usable now.

The packaged application is still rough around the edges. For example, I could not get themes to work after installing a theme with ya and adding it to theme.toml. I'll keep working on this. Hopefully it will be in a good enough state to be submitted to flathub soon.

Edit: looks like something is wrong with my own config, not flatpak. The version without flatpak sandboxing also cannot be themed.

@lihaohong6
Copy link
Author

@sxyazi One comment from the flathub review mentions moving the screenshot upstream instead of having it in the downstream flatpak packaging repository. Are you okay with adding a screenshot to this repo? If so, where would you like to store it and which image would you like to use? assets seems to be a good location.

I tried using a frame from the introduction video in the README file but realized that flathub's guidelines on screenshots require them to be taken on Linux instead of macOS as shown in the video.

@sxyazi
Copy link
Owner

sxyazi commented Dec 25, 2024

Yeah sure, I'm open to that, you can raise a PR if necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

3 participants