Package not in rod

The "index" is the list of packages that rod can install. If the program you want is not in it, there are four ways to run it. They are listed here from the smallest change to the system to the largest.

1. Look for it

# rod +s
# rod +f WORD
# rod +n NAME

rod +f WORD takes one word and prints recipe: NAME for each recipe whose file name contains it, then the matching attributes of the index with name and description. The recipe match ignores case. rod +n NAME prints the description and homepage of one attribute, or rod: no package NAME when it does not exist.

The program may be in a newer or older index. rod +s without an argument fetches the channel in /etc/rod.conf, and rod +s REV fetches one nixpkgs commit of 40 lowercase hexadecimal characters. Either moves the whole index, and the next rod +u upgrades every package that is not held. Hold the packages you want to keep with rod +t NAME. See rod.

A package that is in the index but not in the binary cache is built on your machine, as the user that runs rod, without the Nix build sandbox.

2. Try it without installing

# rod +e NAME -- COMMAND
# rod +d NAME -- COMMAND

+e puts the packages on the path of a shell or of COMMAND. +d also adds the compiler toolchain and the headers and libraries of the packages, and downloads the toolchain on first use. Both take names from the index and not recipes. Nothing is installed or recorded and no frame is taken, and the packages stay in the store until rod +c.

3. Write a recipe

A recipe in /rod/recipes builds software from a source archive and installs it into the profile like any other package, with a frame before it. See recipes for the format and the hash step.

4. Use a container

A container has it's own root and its own packages, so the system profile stays as it is. See silo, and hazmat for a sandbox around a single program.

A binary from elsewhere

/bin, /usr/bin and /usr/sbin link into /rod/profile/bin, /lib links into /rod/profile/lib and /lib64/ld-linux-x86-64.so.2 links to the loader of the profile. /usr/lib does not exist. A prebuilt x86-64 Linux binary starts, and finds only the libraries in the profile.

When a library is missing the loader prints its name, for example error while loading shared libraries: libfoo.so.1: cannot open shared object file. Find the package with rod +f foo and install it. A binary that expects another glibc than the profile has can still fail. Two other routes avoid that: