Anton-Latukha
722b431657
Core: tests: add dep hspec, {StorePath,Derivation}: fx import
...
> No changes, but 1.1.7 should have been a major version bump due to dropping the Test.Hspec re-export.
https://hackage.haskell.org/package/tasty-hspec-1.2/changelog
M hnix-store-core/tests/Hash.hs
M hnix-store-core/tests/NarFormat.hs
2021-05-30 18:27:45 +03:00
Anton-Latukha
285bf4256f
Core: tests: {StorePath,Derivation}: fx Text function type
2021-05-30 18:24:52 +03:00
Richard Marko
2a897ab581
core: fix nar test failing when there's no /proc
...
Closes #109 .
2021-02-25 12:49:23 +02:00
Anton-Latukha
f86235758a
Core, Remote: (++) -> (<>)
...
*afaik* (++) does not even work with OverloadedStrings with Text or ByteString.
Lets allow ourselves to switch from [] & Strings in Haskell in any part of the code.
2021-02-03 13:02:03 +02:00
Anton-Latukha
c49eb9b6d7
Core, Remote: return -> pure
...
I wonder why type system needs to infer Monad constraint where Applicative would
suffice.
2021-02-03 12:52:48 +02:00
Anton Latukha
792c76b0af
Core, Remote: handcrafted code clean-up ( #134 )
...
`brittany` was used.
Then all changes passed through manual supervision.
Then handcrafted code cleanup was done.
All changes are pure lambda code refactoring,
there should be no changes to the functionality.
2021-02-03 12:44:58 +02:00
Richard Marko
637cf0a938
core: fix all warnings
2021-01-14 11:08:42 +01:00
Anton-Latukha
3ece3b4e50
hnix-store-{core,remote}: support both base16-bytestring
epochs
2020-12-30 13:47:28 +02:00
Anton-Latukha
5d160cd5c5
core & remote: cosmetics
2020-12-17 00:58:07 +02:00
Richard Marko
ee42448154
core: qualified Base32 in Hash test
...
Related to #87 .
2020-12-17 00:56:58 +02:00
Anton-Latukha
54ec4855ba
core & remote: refactor (Digest <-> BaseNN) encodeInBase & decodeBase
...
also rename functions `encodeIn` `decode` to `encodeInBase` `decodeBase`
2020-12-17 00:56:00 +02:00
Richard Marko
9126129372
core: fix tests due to B16.decode changing type
2020-12-14 10:15:25 +01:00
Greg Hale
3de47a36e7
Use constant-space encoding and decoding for NARs
2020-08-05 21:00:52 -04:00
Richard Marko
1076926515
core: add System.Nix.Derivation and tests
2020-07-14 13:27:24 +02:00
Richard Marko
1f862114c6
simple store path root, remote store rework
...
Closes #15 , #16 , #21 , #22 , #62 .
2020-07-14 13:27:24 +02:00
Greg Hale
7e61a7ca22
Merge pull request #57 from sorki/b32
...
Base16/Base32 decoding, props/tests
2020-03-22 11:17:17 -04:00
Richard Marko
8b8e675039
fix nar test lookup for src directory
...
Now also looks in `hnix-store-core/src` as well and won't fail
even if either of them doesn't exist (which is not a big deal
in this case).
2020-03-05 12:06:15 +01:00
Richard Marko
d82ba9f3a7
Base16/Base32 decoding, props/tests
2020-03-04 10:41:04 +01:00
Shea Levy
5a270eff70
NarFormat test: Remove dependency on System.Nix.Path.
2019-03-22 09:43:12 -04:00
Shea Levy
8dd4805936
Hash test: Depend on new StorePath module.
2019-03-22 09:42:33 -04:00
Shea Levy
71025ed892
Hash digests: Only export primitives for rendering as hex and base32
...
The old 'digestText16' was really a special case that doesn't belong
in the hashing module proper.
2019-03-11 02:28:26 -04:00
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