Commit Graph

4 Commits

Author SHA1 Message Date
John Ericson
9bbe54a03b Add test corresponding to builtins.placeholder "foo" in layer above
We were hashing correctly, but base32-ing wrong.
2019-03-10 12:30:26 -04:00
Greg Hale
aeb98a90a8 Add an API and implementation for basic nix hashes
- Define MD5, SHA1 and SHA256 algos
 - Design typclass to handle type-specific hashing behavior
   - hash digest generation
   - printing to base32
 - Differentiate between parts meant to be used outside (by hnix-store-*, hnix)
   and parts meant to be used only internaly (in **.Internal.** modules)
 - Observe that hashing "Hello World" @SHA1 and serializing to base32 gives
   the same hash as the one in the thesis example
   "s23c9fs0v32pf6bhmcph5rbqsyl5ak8a"
2018-11-17 14:35:35 -05:00
Greg Hale
6734486e06 Put bounded-memory NAR format tests behind a cabal flag deaulting to False
The test suite fails when run naively, due to the use of haskell code that
uses gc statistics, and requires `+RTS -T` flags be passed to the testsuite.

We opt in to this flag for CI and for any default.nix that packages
hnix-store-core.
2018-09-11 23:09:00 -04:00
Greg Hale
7f1928edcb Add NAR parser-generator and tests 2018-05-15 11:09:20 -04:00