forked from lix-project/lix
3f192ac80c
For text files it is possible to do it like so: `builtins.hashString "sha256" (builtins.readFile /tmp/a)` but that doesn't work for binary files. With builtins.hashFile any kind of file can be conveniently hashed.
6 lines
204 B
Nix
6 lines
204 B
Nix
let
|
|
paths = [ ./this-file-is-definitely-not-there-7392097 "/and/neither/is/this/37293620" ];
|
|
in
|
|
builtins.concatLists (map (hash: map (builtins.hashFile hash) paths) ["md5" "sha1" "sha256" "sha512"])
|
|
|