For the complete documentation index, see llms.txt. This page is also available as Markdown.

NixAppImage

AppImages built from Nix derivations

An AppImage produced by a Nix bundler rather than assembled by hand. The derivation's full closure goes into the image, which is what makes it portable: every dependency is present by construction, with nothing taken from the host and no dependency on the host's glibc.

nix bundle --bundler github:ralismark/nix-appimage nixpkgs#hello

The result is a type 2 AppImage, a runtime concatenated with a SquashFS filesystem, so everything true of a traditional AppImage is true of this one too.


In soarpkgs

Soar installs this format from a repository, a URL, or a local file, and a recipe can name it as its type. No package in soarpkgs happens to use it at the moment.


Prerequisites (HOST)

  • Kernel user namespaces: required, and not optional here. The bundle has to put the Nix store where the closure expects it, which is what namespaces are for. Available since Linux 3.8, but disabled on some systems for security reasons.

  • Fuse: to mount the SquashFS, with --appimage-extract-and-run as the fallback, as for any traditional AppImage.

  • Fonts: required to display/render non-English characters, symbols and emoji.


Quirks

KNOWN ISSUES

  • OpenGL: graphics drivers are the one thing a closure cannot bring with it, since they have to match the host, so GL applications generally do not run off NixOS without something like nixGL. See nixpkgs#9415.

  • Desktop integration: .desktop files and icons are copied on a best-effort basis, so an application may run fine and still not appear in a launcher.

  • Size: roughly 2-5x larger than the other formats, which is the cost of shipping the whole closure and the reason portability is otherwise absolute.

  • Plain files in the root directory are not visible to the bundled application.

WARNINGS

  • NEVER run strip, objcopy or any other binary rewriting tool as they will often just strip the squashfs archive, only preserving the runtime.

  • A typical .nixappimage file is not a real elf binary, thus will not survive this process.

Last updated