You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be convenient if Fish published an AppImage along with its other release artifacts.
My use-case for such a thing: It would be very useful to be able to curl an AppImage on a system that I do not have administrative access over, and start using fish-shell even there. The workflow looks like:
Okay, most of this is already in place and I managed to make an appimage in ~10 minutes.
The gist of it is:
You need a .desktop file and an icon, and the "linuxdeploy" program is quite strict about both. The categories have to be right and everything
You build fish like normal, but with CMAKE_INSTALL_PREFIX=/usr explicitly, then you install with DESTDIR=tempdir
Then you run linuxdeploy, in my case ./linuxdeploy-x86_64.AppImage --appdir tempdir --executable tempdir/usr/bin/fish --output appimage
This pulls in all the libraries etc against which fish has been built and puts it into a squashfs that then forms the appimage. The resulting file is 30-50mb in size (I've seen both, dunno why exactly?) and can be executed immediately.
It seems to pick up the config and such? It's not sandboxed, but $__fish_sysconf_dir and similar are set to something like "/tmp/.mount_fish-3ds1GPr/usr/etc/fish".
Doing ldd /tmp/.mount_fish-3yvgdVf/usr/bin/fish reveals that it's copied over libncursesw.so.6 and libpcre2-32.so.0, but not libstdc++ or libc. I'm not entirely sure how wise that is or how well that works.
Overall it seems quite simple to do, but I'm not sure how well it really works and if we want to add yet another item onto the release todo list.
Regarding exactly what makes it into the app image, perhaps it would be helpful to reference what NeoVim does. I have not opened up their AppImage, but it may be telling of what a good strategy is. Periodically I have found their AppImage useful.
and if we want to add yet another item onto the release todo list.
Perhaps the following is better suited to another ticket, but is this not something that could be automatically delegated to CI/CD? Are releases cut manually at the moment? These are all things I would potentially be willing to create PRs for.
A .desktop file would be useful for the various Linux distribution packages as well, so let's definitely do that.
We ship three ways of installing on macOS, so I'm happy to take additional methods on other OSes. We did have a request for blessing a snap package (#3664), but the limited adoption of snap makes me less inclined to support it - flatpak is also probably reasonable to add.
@zanchey I just tried to download the AppImage to test it, but I am unable to without a login (or so it would appear). Perhaps something is amiss with my phone (I am doing development from my phone this afternoon, perhaps I will try another device soon).
I'm sorry but right now I cannot allocate time for updating this repo to the rust version. Also I do not plan to make nightly releases from master - without proper automation and integration with the upstream fish repo it would take too much effort to maintain them. Besides, I really hope that fish maintainers will provide an official appimage by the time 3.7 is released.
Unfortunately, you don't: You still need to go through the appimage build process, and you still need libfuse to run it. And to link it statically you would have to use musl (glibc has an unavoidable crash), and so you would lose performance.
Well, everything has tradeoffs. The appimage build process would be extremely simple in this case, and isn't using musl libc a great thing? You are right about FUSE though, but isn't it available on every desktop system anyway? In any case, just wanted to mention that AppImage and static linking are not mutually exclusive.
For our purposes, musl is quite literally just slower. We'd use it if we have to, but only then because there's no upside.
(sidenote it's "musl libc", glibc is the gnu one)
You are right about FUSE though, but isn't it available on every desktop system anyway
Fish doesn't just run on desktop systems. I'm talking about libfuse because I ran into a system where it wasn't installed, just on the systems I have lying around (and where I do run fish).
In fact these sorts of builds are more geared to systems you rarely use, where it would be cool if you could just scp a binary. And you might not have root access, so installing a dependency kinda ruins the entire thing.
The appimage build process would be extremely simple
The alternative is to not have it at all, which is even simpler.
In any case, just wanted to mention that AppImage and static linking are not mutually exclusive.
Yes, and I'm saying that if you combine the two you end up with something worse than either alone.
Flatpak is an option on OBS these days too.
Note that flatpak requires more of a runtime than appimages, and is pretty heavy on sandboxing which won't work for us (a shell kinda needs full access to the system).
Activity
faho commentedon Jan 6, 2020
Okay, most of this is already in place and I managed to make an appimage in ~10 minutes.
The gist of it is:
You need a .desktop file and an icon, and the "linuxdeploy" program is quite strict about both. The categories have to be right and everything
You build fish like normal, but with CMAKE_INSTALL_PREFIX=/usr explicitly, then you install with DESTDIR=tempdir
Then you run
linuxdeploy, in my case./linuxdeploy-x86_64.AppImage --appdir tempdir --executable tempdir/usr/bin/fish --output appimageThis pulls in all the libraries etc against which fish has been built and puts it into a squashfs that then forms the appimage. The resulting file is 30-50mb in size (I've seen both, dunno why exactly?) and can be executed immediately.
It seems to pick up the config and such? It's not sandboxed, but $__fish_sysconf_dir and similar are set to something like "/tmp/.mount_fish-3ds1GPr/usr/etc/fish".
Doing
ldd /tmp/.mount_fish-3yvgdVf/usr/bin/fishreveals that it's copied over libncursesw.so.6 and libpcre2-32.so.0, but not libstdc++ or libc. I'm not entirely sure how wise that is or how well that works.Overall it seems quite simple to do, but I'm not sure how well it really works and if we want to add yet another item onto the release todo list.
jrop commentedon Jan 6, 2020
@faho Thanks for being so responsive.
Regarding exactly what makes it into the app image, perhaps it would be helpful to reference what NeoVim does. I have not opened up their AppImage, but it may be telling of what a good strategy is. Periodically I have found their AppImage useful.
Perhaps the following is better suited to another ticket, but is this not something that could be automatically delegated to CI/CD? Are releases cut manually at the moment? These are all things I would potentially be willing to create PRs for.
zanchey commentedon Jan 7, 2020
A
.desktopfile would be useful for the various Linux distribution packages as well, so let's definitely do that.We ship three ways of installing on macOS, so I'm happy to take additional methods on other OSes. We did have a request for blessing a snap package (#3664), but the limited adoption of snap makes me less inclined to support it - flatpak is also probably reasonable to add.
zanchey commentedon Jan 7, 2020
OBS already supports building AppImages, so that's an easy win; you just need to create the right
appimage.yml.Add .desktop file and logo for appimage
zanchey commentedon Jan 29, 2020
I've added AppImages to the nightly/CI builds, at https://build.opensuse.org/package/binaries/shells:fish:nightly:master/fish/AppImage - I wonder if there's a better way of publishing them, as they don't appear in the landing page at https://software.opensuse.org//download.html?project=shells%3Afish%3Anightly%3Amaster&package=fish
jrop commentedon Feb 2, 2020
@zanchey I just tried to download the AppImage to test it, but I am unable to without a login (or so it would appear). Perhaps something is amiss with my phone (I am doing development from my phone this afternoon, perhaps I will try another device soon).
zanchey commentedon Feb 3, 2020
Maybe try from https://download.opensuse.org/repositories/shells:/fish:/nightly:/master/AppImage/
58 remaining items
lengyijun commentedon Apr 6, 2023
oh, an appimage based on master(rust version) is quite useful to me !
mliszcz commentedon Apr 6, 2023
There is a 3.6.1 build here: https://github.com/mliszcz/fish-shell/releases/tag/fish-3.6.1-x86_64
I'm sorry but right now I cannot allocate time for updating this repo to the rust version. Also I do not plan to make nightly releases from master - without proper automation and integration with the upstream fish repo it would take too much effort to maintain them. Besides, I really hope that fish maintainers will provide an official appimage by the time 3.7 is released.
In the meantime perhaps you can try the releases from suse. There is the 'latest' appimage, but I don't know the version. Note that the last time I tried those, they didn't work well (e.g. were not loading my configuration files):
https://download.opensuse.org/repositories/shells:/fish:/nightly:/master/AppImage/
Justinzobel commentedon May 2, 2024
Is the AppImage something you would consider releasing officially on the homepage for stable builds?
faho commentedon May 2, 2024
Appimages in general? Possibly. Tbh I've tried it a bit and I'm not a massive fan, I'd go for static builds (#10367).
The current appimage, as it exists? No.
probonopd commentedon May 2, 2024
Why not a static binary inside an AppImage? That way you get the advantages of both.
faho commentedon May 2, 2024
Unfortunately, you don't: You still need to go through the appimage build process, and you still need libfuse to run it. And to link it statically you would have to use musl (glibc has an unavoidable crash), and so you would lose performance.
It's closer to worst-of-both than best-of-both.
probonopd commentedon May 2, 2024
Well, everything has tradeoffs. The appimage build process would be extremely simple in this case, and isn't using musl libc a great thing? You are right about FUSE though, but isn't it available on every desktop system anyway? In any case, just wanted to mention that AppImage and static linking are not mutually exclusive.
zanchey commentedon May 2, 2024
The AppImage builds in OBS are weirdly busted; I've updated the config so that it least has the dependencies it needs, but it doesn't actually try to produce an image. The documentation at https://docs.appimage.org/packaging-guide/hosted-services/opensuse-build-service.html is what leads to this state. There's no documentation on https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.package_formats and a brief look through the source didn't yield any obvious takeaways.
Flatpak is an option on OBS these days too.
faho commentedon May 2, 2024
For our purposes, musl is quite literally just slower. We'd use it if we have to, but only then because there's no upside.
(sidenote it's "musl libc", glibc is the gnu one)
Fish doesn't just run on desktop systems. I'm talking about libfuse because I ran into a system where it wasn't installed, just on the systems I have lying around (and where I do run fish).
In fact these sorts of builds are more geared to systems you rarely use, where it would be cool if you could just scp a binary. And you might not have root access, so installing a dependency kinda ruins the entire thing.
The alternative is to not have it at all, which is even simpler.
Yes, and I'm saying that if you combine the two you end up with something worse than either alone.
Note that flatpak requires more of a runtime than appimages, and is pretty heavy on sandboxing which won't work for us (a shell kinda needs full access to the system).
probonopd commentedon May 6, 2024
faho commentedon Dec 13, 2024
Alright, we now have self-installable builds (#10367).
To install fish, run
cargo install --git https://github.com/fish-shell/fish-shell ~/.cargo/bin/fishor download pre-built statically linked versions from https://github.com/fish-shell/fish-shell/actions/workflows/staticbuild.yml - these are zips containing an x86_64 and an aarch64 build that should run on "any" linux, no dependency on libfuse or anything.
I'm running those regularly for now, we could also offer them as an installation option on fishshell.com.
Since I don't think there's anything appimages would improve here, I'm closing this.