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 #590

Open
lihaohong6 opened this issue Feb 12, 2025 · 1 comment
Open

Package for flatpak #590

lihaohong6 opened this issue Feb 12, 2025 · 1 comment

Comments

@lihaohong6
Copy link
Contributor

As a follow-up to the previous issue, since flatpak comes preinstalled on most Linux distros except for Ubuntu and its derivatives, it'll be a nicer cross-platform solution for Linux than docker or brew.

Flatpak is designed for desktop applications and comes with some sandboxing restrictions. But, in my previous experience, flathub will accept command line applications after giving a notice that their platform is not ideal for CLI programs. The sandboxing aspect won't affect scc since all it needs is read-only filesystem access. There are only a few directories inaccessible to sandboxed flatpak applications (e.g. /usr), and users are unlikely to put their programs in there.

I already have a working version on https://github.com/lihaohong6/flathub/tree/scc-submission. It can be tested by installing flatpak-builder and then running the following to build

flatpak-builder --force-clean --install-deps-from=flathub --user --install builddir io.github.boyter.scc.yml

After that, running flatpak run --filesystem="$PWD":ro io.github.boyter.scc will run scc in the current directory. Making a shell alias would greatly reduce the typing required and the experience should be more-or-less indistinguishable from a native install. In my testing, counting the LOC in the linux kernel takes 0.75 seconds on a native install and 0.8 seconds on the flatpak version (1.3 seconds for the first run, presumably due to warmup).

I'm wondering if you're interested in submitting it to flathub. It'll make the application appear as "Verified" since it is submitted by the original author. The downside is that flathub's quality control standards will take some time to meet (e.g. adding a screenshot, upstreaming the appdata file, etc.). I can help along the way if the need arises.

@boyter
Copy link
Owner

boyter commented Feb 13, 2025

Yes always happy to have these things done.

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

2 participants