Generate Nix binary caches without nix copy

Here's how to create a Nix binary cache from a derivation's closure within a Nix derivation. Since you can't run nix commands within derivations, this can be useful for including a build closure within an installation medium, such as when performing a NixOS offline installation.