-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
appimage-run: init #41762
appimage-run: init #41762
Conversation
export APPDIR="$SQUASHFS_ROOT/squashfs-root" | ||
export APPIMAGE_SILENT_INSTALL=1 | ||
|
||
cd "$SQUASHFS_ROOT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this happen after the [ ! -x ... ]
check? Now you'd have to specify absolute paths when cd-ing into $SQUASHFS_ROOT
and checking paths afterwords
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted, thank you. Should work with relative and absolute paths now (tested a few times)
Why don't you run the appimage unextracted? |
@orivej It uses FUSE, which needs fusermount, which is SUID, which is not allowed in the sandbox
It can be done prettier, without a user env (by extracting into the store and patching there), but I don't see how it could be done with unextracted AppImages and without any kind of FHS env. :/ |
Not sure how common this is among AppImage files but apparently the one for https://moo.do wants gtk3, adding that was useful. Although now getting an error that appears to be from electron -- which tells me everything I wanted to know about this AppImage anyway (I was wondering if it was a wrapper for the web interface or an actual program haha). Anyway might be worth adding gtk3 deps too, especially since they're the "norm" these days. Steam apps probably use a lot less GTK :). For the curious:
Seems to work with the latest Cutter appimage! \o/ https://github.com/radareorg/cutter/releases/download/v1.4/Cutter-v1.4-x86_64.AppImage Hmm well it launches but has problems opening files:
It's quite possible neither of these are representative of general AppImage behavior, in fact I originally came to comment that this seems good to merge and we can improve as we go :). |
@dtzWill Thanks for testing! I mostly ran the Patchwork, Patchbay, and HexoEditor AppImages (and Subsurface didn't work) with it. CutterThis error is because Python uses This can be fixed by |
This adds a best-effort hack to run AppImages, which currently don't work out-of-the-box on NixOS. This is not preferable to using packaged applications, but may help users if the application they want to run is not in nixpkgs. It uses the package list from the Steam chroot, but without Steam packages.
I also switched from extracting to a |
Sounds good to me. Also, tried again with Cutter and.. success! \o/ |
Looks good to me, anything left to address? |
Not from my side, just waiting for someone with the permission to merge :) |
Hi. I have an issue regarding this PR (tested locally by cherry-picking to nixos-18.03). Details are here lutzroeder/netron#120 In short - AppImage application named
Should I open separate Issue for this? |
@tilpner Do you plan to add some documentation about running AppImages and packaging best practices (appimage-run vs appimage-tools) to the nixpkgs manual? That'd be great and you seem to be very familiar to this. |
@schmittlauch There already is (but there could always be more). See https://github.com/NixOS/nixpkgs/blob/master/doc/functions/appimagetools.xml |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/why-does-nix-need-to-wrap-appimages/23042/5 |
Motivation for this change
This adds a best-effort hack to run AppImages, which currently don't
work out-of-the-box on NixOS. This is not preferable to using packaged
applications, but may help users if the application they want to run
is not in nixpkgs.
It uses the package list from the Steam chroot, but without Steam
packages.
As with steam-run, this does little sandboxing. I have an alternative
expression that uses bubblewrap to isolate the users data from
the to-be-run AppImage.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)