2021-01-24 00:40:18 +00:00
|
|
|
{ lib
|
2020-05-27 01:27:48 +00:00
|
|
|
, bash
|
|
|
|
, binutils-unwrapped
|
|
|
|
, coreutils
|
|
|
|
, gawk
|
|
|
|
, libarchive
|
|
|
|
, pv
|
|
|
|
, squashfsTools
|
|
|
|
, buildFHSUserEnv
|
|
|
|
, pkgs
|
|
|
|
}:
|
2019-01-27 13:02:50 +00:00
|
|
|
|
|
|
|
rec {
|
2020-03-05 22:57:36 +00:00
|
|
|
appimage-exec = pkgs.substituteAll {
|
|
|
|
src = ./appimage-exec.sh;
|
|
|
|
isExecutable = true;
|
|
|
|
dir = "bin";
|
2021-01-24 00:40:18 +00:00
|
|
|
path = lib.makeBinPath [
|
2020-05-27 01:27:48 +00:00
|
|
|
bash
|
|
|
|
binutils-unwrapped
|
|
|
|
coreutils
|
|
|
|
gawk
|
|
|
|
libarchive
|
|
|
|
pv
|
|
|
|
squashfsTools
|
|
|
|
];
|
2019-01-27 13:02:50 +00:00
|
|
|
};
|
|
|
|
|
2021-10-28 09:50:58 +00:00
|
|
|
extract = args@{ name ? "${args.pname}-${args.version}", src, ... }: pkgs.runCommand "${name}-extracted" {
|
2020-05-27 01:27:48 +00:00
|
|
|
buildInputs = [ appimage-exec ];
|
|
|
|
} ''
|
|
|
|
appimage-exec.sh -x $out ${src}
|
|
|
|
'';
|
2020-03-05 22:57:36 +00:00
|
|
|
|
|
|
|
# for compatibility, deprecated
|
2020-03-03 23:46:00 +00:00
|
|
|
extractType1 = extract;
|
|
|
|
extractType2 = extract;
|
2020-03-08 16:55:43 +00:00
|
|
|
wrapType1 = wrapType2;
|
2020-03-03 23:46:00 +00:00
|
|
|
|
2022-06-11 14:30:38 +00:00
|
|
|
wrapAppImage = args@{
|
|
|
|
name ? "${args.pname}-${args.version}",
|
|
|
|
src,
|
|
|
|
extraPkgs,
|
|
|
|
meta ? {},
|
|
|
|
...
|
|
|
|
}: buildFHSUserEnv
|
2020-05-27 01:27:48 +00:00
|
|
|
(defaultFhsEnvArgs // {
|
|
|
|
inherit name;
|
2019-01-27 13:02:50 +00:00
|
|
|
|
2020-05-27 01:27:48 +00:00
|
|
|
targetPkgs = pkgs: [ appimage-exec ]
|
|
|
|
++ defaultFhsEnvArgs.targetPkgs pkgs ++ extraPkgs pkgs;
|
2019-01-27 13:02:50 +00:00
|
|
|
|
2021-07-02 00:08:24 +00:00
|
|
|
runScript = "appimage-exec.sh -w ${src} --";
|
2022-06-11 14:30:38 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
|
|
} // meta;
|
2021-10-28 09:50:58 +00:00
|
|
|
} // (removeAttrs args ([ "pname" "version" ] ++ (builtins.attrNames (builtins.functionArgs wrapAppImage)))));
|
2019-01-27 13:02:50 +00:00
|
|
|
|
2021-10-28 09:50:58 +00:00
|
|
|
wrapType2 = args@{ name ? "${args.pname}-${args.version}", src, extraPkgs ? pkgs: [ ], ... }: wrapAppImage
|
2020-05-27 01:27:48 +00:00
|
|
|
(args // {
|
|
|
|
inherit name extraPkgs;
|
|
|
|
src = extract { inherit name src; };
|
|
|
|
});
|
2019-01-27 13:02:50 +00:00
|
|
|
|
|
|
|
defaultFhsEnvArgs = {
|
|
|
|
name = "appimage-env";
|
|
|
|
|
|
|
|
# Most of the packages were taken from the Steam chroot
|
|
|
|
targetPkgs = pkgs: with pkgs; [
|
|
|
|
gtk3
|
|
|
|
bashInteractive
|
2021-05-07 21:18:14 +00:00
|
|
|
gnome.zenity
|
2019-01-27 13:02:50 +00:00
|
|
|
python2
|
|
|
|
xorg.xrandr
|
|
|
|
which
|
|
|
|
perl
|
2021-02-01 08:05:09 +00:00
|
|
|
xdg-utils
|
2019-01-27 13:02:50 +00:00
|
|
|
iana-etc
|
|
|
|
krb5
|
2022-03-02 23:23:11 +00:00
|
|
|
gsettings-desktop-schemas
|
|
|
|
hicolor-icon-theme # dont show a gtk warning about hicolor not being installed
|
2019-01-27 13:02:50 +00:00
|
|
|
];
|
|
|
|
|
2019-03-09 21:03:26 +00:00
|
|
|
# list of libraries expected in an appimage environment:
|
|
|
|
# https://github.com/AppImage/pkg2appimage/blob/master/excludelist
|
2019-01-27 13:02:50 +00:00
|
|
|
multiPkgs = pkgs: with pkgs; [
|
|
|
|
desktop-file-utils
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXfixes
|
|
|
|
libGL
|
|
|
|
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-ugly
|
2020-07-18 09:51:05 +00:00
|
|
|
gst_all_1.gst-plugins-base
|
2019-01-27 13:02:50 +00:00
|
|
|
libdrm
|
|
|
|
xorg.xkeyboardconfig
|
|
|
|
xorg.libpciaccess
|
|
|
|
|
|
|
|
glib
|
|
|
|
gtk2
|
|
|
|
bzip2
|
|
|
|
zlib
|
2019-05-22 11:03:39 +00:00
|
|
|
gdk-pixbuf
|
2019-01-27 13:02:50 +00:00
|
|
|
|
|
|
|
xorg.libXinerama
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
xorg.libXxf86vm
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libSM
|
|
|
|
xorg.libICE
|
|
|
|
freetype
|
2022-04-30 16:56:59 +00:00
|
|
|
curlWithGnuTls
|
2019-01-27 13:02:50 +00:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
fontconfig
|
|
|
|
cairo
|
|
|
|
pango
|
|
|
|
expat
|
|
|
|
dbus
|
|
|
|
cups
|
|
|
|
libcap
|
|
|
|
SDL2
|
|
|
|
libusb1
|
|
|
|
udev
|
|
|
|
dbus-glib
|
|
|
|
atk
|
|
|
|
at-spi2-atk
|
|
|
|
libudev0-shim
|
|
|
|
|
|
|
|
xorg.libXt
|
|
|
|
xorg.libXmu
|
|
|
|
xorg.libxcb
|
2019-04-21 18:10:31 +00:00
|
|
|
xorg.xcbutil
|
|
|
|
xorg.xcbutilwm
|
|
|
|
xorg.xcbutilimage
|
|
|
|
xorg.xcbutilkeysyms
|
|
|
|
xorg.xcbutilrenderutil
|
2019-01-27 13:02:50 +00:00
|
|
|
libGLU
|
|
|
|
libuuid
|
|
|
|
libogg
|
|
|
|
libvorbis
|
|
|
|
SDL
|
|
|
|
SDL2_image
|
|
|
|
glew110
|
|
|
|
openssl
|
|
|
|
libidn
|
|
|
|
tbb
|
|
|
|
wayland
|
2019-05-28 19:09:34 +00:00
|
|
|
mesa
|
2019-01-27 13:02:50 +00:00
|
|
|
libxkbcommon
|
2022-08-23 15:32:29 +00:00
|
|
|
vulkan-loader
|
2019-01-27 13:02:50 +00:00
|
|
|
|
|
|
|
flac
|
|
|
|
freeglut
|
|
|
|
libjpeg
|
|
|
|
libpng12
|
2022-08-23 15:32:29 +00:00
|
|
|
libpulseaudio
|
2019-01-27 13:02:50 +00:00
|
|
|
libsamplerate
|
|
|
|
libmikmod
|
|
|
|
libtheora
|
|
|
|
libtiff
|
|
|
|
pixman
|
|
|
|
speex
|
|
|
|
SDL_image
|
|
|
|
SDL_ttf
|
|
|
|
SDL_mixer
|
|
|
|
SDL2_ttf
|
|
|
|
SDL2_mixer
|
|
|
|
libappindicator-gtk2
|
|
|
|
libcaca
|
|
|
|
libcanberra
|
|
|
|
libgcrypt
|
|
|
|
libvpx
|
|
|
|
librsvg
|
|
|
|
xorg.libXft
|
|
|
|
libvdpau
|
2021-06-10 02:57:09 +00:00
|
|
|
alsa-lib
|
2019-03-09 21:03:26 +00:00
|
|
|
|
|
|
|
harfbuzz
|
|
|
|
e2fsprogs
|
2021-09-04 20:05:03 +00:00
|
|
|
libgpg-error
|
2019-03-09 21:03:26 +00:00
|
|
|
keyutils.lib
|
|
|
|
libjack2
|
|
|
|
fribidi
|
2019-11-23 20:28:01 +00:00
|
|
|
p11-kit
|
2019-04-20 10:28:45 +00:00
|
|
|
|
2022-02-15 16:18:43 +00:00
|
|
|
gmp
|
|
|
|
|
2019-04-20 10:28:45 +00:00
|
|
|
# libraries not on the upstream include list, but nevertheless expected
|
|
|
|
# by at least one appimage
|
|
|
|
libtool.lib # for Synfigstudio
|
2021-03-12 00:21:33 +00:00
|
|
|
xorg.libxshmfence # for apple-music-electron
|
2019-09-16 00:33:15 +00:00
|
|
|
at-spi2-core
|
2019-01-27 13:02:50 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|