* nix/guix-register/guix-register.cc (prefix): New variable.
(parse_opt): Use it.
(register_validity): Change 'info.path' to the final store name.
Hash the final under its real path.
* tests/guix-register.sh: Adjust the contents of $closure accordingly.
Rename 'NIX_LOCALSTATE_DIR' to 'NIX_STATE_DIR'. Don't try to call
'valid-path?'. Add test using 'sqlite3'.