| Copyright | (c) 2020 Jordan Mackie |
|---|---|
| License | MIT |
| Maintainer | Jordan Mackie <contact@jmackie.dev> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Kesha
Description
An implementation of nix-hash.
Synopsis
- hash :: FilePath -> IO (Either PackError ByteString)
- hashWith :: HashOptions -> FilePath -> IO (Either PackError ByteString)
- data HashOptions = HashOptions {}
- defaultHashOptions :: HashOptions
- data HashAlgo
- data HashRepr
Documentation
hash :: FilePath -> IO (Either PackError ByteString) Source #
Compute the cryptographic hash of a path using the defaultHashOptions.
The output of should be consistent with that of
hash pathnix-hash --type sha256 --base32 path.
hashWith :: HashOptions -> FilePath -> IO (Either PackError ByteString) Source #
Compute the cryptographic hash of a path using the given HashOptions.
defaultHashOptions :: HashOptions Source #
Default hashing options.
These are the default options used by most of the Nix tooling (e.g.
nix-prefetch-git).