🍗 Wiki

Nix

Nix

Nix is a tool for managing packages, generating system configurations, and creating environment in reproducible, declarative, and reliable way.

1. Tips

1.1. Running arbitrary binary in NixOS

You cannot run precompiled binaries in your NixOS system, if the source is not compiled in your NixOS system.

Luckily, there are bunches of solutions you might want to.

  • Patchelf, a traditional way, by manually linking shared objects and setting an interpreter.

  • nix-ld and nix-alien

    • nix-ld can be useful if you want to write a Nix expression with your target binary.

    • nix-alien can be useful if you want to run an unpatched binary instantly.

  • steam-run for Linux native games