Run unpatched binaries on Nix/NixOS by automatically resolving and providing their shared library dependencies.
nix-alien is a command-line tool that allows users to run unpatched, pre-compiled binaries on Nix and NixOS systems. It solves the "No such file or directory" error by automatically detecting the binary's shared library dependencies, fetching them from nixpkgs, and creating an environment where the binary can execute successfully.
Nix and NixOS users who need to run pre-compiled binaries (e.g., proprietary software, games, or tools) that aren't available as Nix packages and would otherwise fail due to missing libraries.
Developers choose nix-alien because it automates the tedious process of manually resolving library dependencies, offers multiple integration methods (FHS, nix-ld), and provides an interactive interface for handling conflicts, making it the most user-friendly solution for running foreign binaries on Nix.
Run unpatched binaries on Nix/NixOS
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses pylddwrap to analyze ELF binaries and fetches required shared libraries from nixpkgs via nix-locate, eliminating manual dependency hunting.
Offers nix-alien for FHS environments, nix-alien-ld for nix-ld integration, and nix-alien-find-libs for scripting, catering to diverse use cases from interactive runs to automation.
Integrates fzf to let users choose between multiple library candidates interactively, simplifying handling of ambiguous dependencies.
Caches generated environment files in XDG_CACHE_HOME, speeding up subsequent runs of the same binary by reusing evaluated Nix expressions.
Fails to automatically handle binaries that use dlopen for runtime library loading, requiring manual workarounds with --additional-libs or --additional-packages flags.
The --additional-packages flag lacks validation, potentially causing 'undefined variable' errors if incorrect package names are provided, as warned in the README.
Requires enabling experimental Nix features like flakes for quick usage, and integration with nix-ld or nixGL adds extra steps, especially for non-NixOS systems.
Relies on fzf for library selection, making it less suitable for automated or headless environments without additional configuration or flags.