Merge pull request #57169 from timokau/appimage-improvements
appimage-run improvements
This commit is contained in:
commit
0e8177ad10
2 changed files with 22 additions and 1 deletions
|
@ -75,6 +75,8 @@ rec {
|
||||||
krb5
|
krb5
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# list of libraries expected in an appimage environment:
|
||||||
|
# https://github.com/AppImage/pkg2appimage/blob/master/excludelist
|
||||||
multiPkgs = pkgs: with pkgs; [
|
multiPkgs = pkgs: with pkgs; [
|
||||||
desktop-file-utils
|
desktop-file-utils
|
||||||
xorg.libXcomposite
|
xorg.libXcomposite
|
||||||
|
@ -171,6 +173,17 @@ rec {
|
||||||
xorg.libXft
|
xorg.libXft
|
||||||
libvdpau
|
libvdpau
|
||||||
alsaLib
|
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
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,15 @@ in buildFHSUserEnv (fhsArgs // {
|
||||||
|
|
||||||
runScript = writeScript "appimage-exec" ''
|
runScript = writeScript "appimage-exec" ''
|
||||||
#!${runtimeShell}
|
#!${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")"
|
APPIMAGE="$(realpath "$1")"
|
||||||
|
shift
|
||||||
|
|
||||||
if [ ! -x "$APPIMAGE" ]; then
|
if [ ! -x "$APPIMAGE" ]; then
|
||||||
echo "fatal: $APPIMAGE is not executable"
|
echo "fatal: $APPIMAGE is not executable"
|
||||||
|
@ -43,6 +51,6 @@ in buildFHSUserEnv (fhsArgs // {
|
||||||
exec "$APPIMAGE_DEBUG_EXEC"
|
exec "$APPIMAGE_DEBUG_EXEC"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec ./AppRun
|
exec ./AppRun "$@"
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue