1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

Add "nix sign-paths" command

E.g.

  $ nix sign-paths -k ./secret -r $(type -p geeqie)

signs geeqie and all its dependencies using the key in ./secret.
This commit is contained in:
Eelco Dolstra 2016-04-05 16:39:29 +02:00
parent d0f5719c2a
commit b654381eb3
2 changed files with 52 additions and 1 deletions

View file

@ -312,6 +312,9 @@ void Store::exportPaths(const Paths & paths,
std::string ValidPathInfo::fingerprint() const
{
if (narSize == 0 || narHash.type == htUnknown)
throw Error(format("cannot calculate fingerprint of path %s because its size/hash is not known")
% path);
return
"1;" + path + ";"
+ printHashType(narHash.type) + ":" + printHash32(narHash) + ";"