mirror of
https://github.com/NixOS/nix.git
synced 2025-11-28 05:00:58 +01:00
* A utility `nix-hash' to compute Nix path hashes.
This commit is contained in:
parent
bfa5d77211
commit
7952a8053c
3 changed files with 21 additions and 4 deletions
16
src/nix-hash.cc
Normal file
16
src/nix-hash.cc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include <iostream>
|
||||
|
||||
#include "hash.hh"
|
||||
#include "shared.hh"
|
||||
|
||||
|
||||
void run(Strings args)
|
||||
{
|
||||
for (Strings::iterator it = args.begin();
|
||||
it != args.end(); it++)
|
||||
cout << format("%1%\n") % (string) hashPath(*it);
|
||||
}
|
||||
|
||||
|
||||
string programId = "nix-hash";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue