Merge pull request #57169 from timokau/appimage-improvements

appimage-run improvements
This commit is contained in:
Timo Kaufmann 2019-04-20 18:27:00 +02:00 committed by GitHub
commit 0e8177ad10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 1 deletions

View file

@ -75,6 +75,8 @@ rec {
krb5
];
# list of libraries expected in an appimage environment:
# https://github.com/AppImage/pkg2appimage/blob/master/excludelist
multiPkgs = pkgs: with pkgs; [
desktop-file-utils
xorg.libXcomposite
@ -171,6 +173,17 @@ rec {
xorg.libXft
libvdpau
alsaLib
harfbuzz
e2fsprogs
libgpgerror
keyutils.lib
libjack2
fribidi
# libraries not on the upstream include list, but nevertheless expected
# by at least one appimage
libtool.lib # for Synfigstudio
];
};
}

View file

@ -10,7 +10,15 @@ in buildFHSUserEnv (fhsArgs // {
runScript = writeScript "appimage-exec" ''
#!${runtimeShell}
if [ $# -eq 0 ]; then
echo "Usage: $0 FILE [OPTION...]"
echo
echo 'Options are passed on to the appimage.'
echo "If you want to execute a custom command in the appimage's environment, set the APPIMAGE_DEBUG_EXEC environment variable."
exit 1
fi
APPIMAGE="$(realpath "$1")"
shift
if [ ! -x "$APPIMAGE" ]; then
echo "fatal: $APPIMAGE is not executable"
@ -43,6 +51,6 @@ in buildFHSUserEnv (fhsArgs // {
exec "$APPIMAGE_DEBUG_EXEC"
fi
exec ./AppRun
exec ./AppRun "$@"
'';
})