Anton-Latukha
10bb0aefab
core: tmp-override-cryptohash-sha512
...
cryptohash-sha512 unmaintained, PR adds support of base 4.14 (GHC 8.10).
The fork got version restriction and several tests removed.
A hnix-store-core/cabal.project
2020-12-22 21:04:53 +02:00
Anton Latukha
72eaf6c01d
readme: sync doc links to source
...
Closes #49
2020-12-19 13:47:40 +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
Anton-Latukha
3e33dc2f5e
core:System/Nix/Internal/Hash: unify decodeBase*
fun under decode
2020-12-17 00:42:31 +02:00
Anton-Latukha
24435f0b87
core:System/Nix/Internal/Hash: unify encodeBase*
fun under encodeIn
2020-12-17 00:42:19 +02:00
Anton-Latukha
901f23ee88
core:System/Nix/Internal/Hash: sort encode*/decode* functions
2020-12-17 00:28:01 +02:00
Anton Latukha
4a1c1a2697
Merge request #86 : use base16-bytestring >= 1, & updating according tests
2020-12-14 11:47:06 +02:00
Richard Marko
9126129372
core: fix tests due to B16.decode changing type
2020-12-14 10:15:25 +01:00
Anton-Latukha
7a81be7ae1
hnix-store-core.cabal: use base16-bytestring >= 1
2020-12-14 10:52:36 +02:00
Richard Marko
bb2a91c09e
core: Add derivation test samples to extra-source-files
2020-12-14 10:43:39 +02:00
Anton Latukha
ab190513af
System/Nix/Internal/Hash: fx decodeBase16, unify decodeBase{16,32,64} functions ( #84 )
...
Yes. One just needed to look at the previous decode* set of functions to understand why they got unified.
Now they can be unified into one function and get Left handled predictably & uniformly.
2020-12-13 16:00:44 +02:00
Greg Hale
e602dc927a
version bump
2020-11-29 09:23:00 -05:00
Richard Marko
353ac1511c
ChangeLog(s): release 0.3.0.0
2020-11-29 15:14:26 +01:00
Richard Marko
69f9af2c00
core: update ChangeLog (base64, SHA512, NAR streaming)
2020-11-16 11:56:31 +01:00
Richard Marko
474725b3de
Merge pull request #73 from layus/sha512
...
Sha512 and base64 support
2020-11-09 12:34:34 +01:00
Guillaume Maudoux
f0d0d12f83
Add support for base64 and sha512
...
cryptohash-sha512 is not yet updated to work with ghc 8.10.
Some jailbreaking is required.
2020-11-03 22:40:56 +01:00
Guillaume Maudoux
a139b6ff12
Do not break everyone's code
...
Force named hashes to be valid. After all, what would be the point of
naming an invalid hash ?
This avoids propagating manually the ValidAlgo requirement everywhere.
2020-10-28 10:15:11 +01:00
Greg Hale
3de47a36e7
Use constant-space encoding and decoding for NARs
2020-08-05 21:00:52 -04:00
Guillaume Maudoux
4fc581ad08
Fix hash computation in makeFixedOutputPath
2020-07-24 12:44:09 +02:00
Guillaume Maudoux
68f85696db
Add mkNamedDigest
to parse text digests
2020-07-24 12:44:09 +02:00
Richard Marko
84cbca23e3
core: Update ChangeLog
2020-07-14 13:27:24 +02:00
Richard Marko
4ddea5b1e9
core: derive Ord for StorePathTrust
2020-07-14 13:27:24 +02:00
Richard Marko
1076926515
core: add System.Nix.Derivation and tests
2020-07-14 13:27:24 +02:00
Richard Marko
11277253c0
switch hackage category from System to Nix
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
Richard Marko
cbe0c49083
Merge pull request #60 from haskell-nix/gh-tmp-changelog
...
hnix-store-core changelog for 0.2.0.0
2020-06-28 10:41:08 +02:00
John Ericson
46cf3fc58f
Merge pull request #36 from puffnfresh/makeFixedOutputPath
...
Add makeFixedOutputPath
2020-03-28 09:58:14 -04:00
Greg Hale
7e61a7ca22
Merge pull request #57 from sorki/b32
...
Base16/Base32 decoding, props/tests
2020-03-22 11:17:17 -04:00
Greg Hale
fe87726b02
hnix-store-core changelog for 0.2.0.0
2020-03-12 09:50:07 -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
Drew Hess
516af6f95f
regex-tdfa 1.3.1.0 replaces regex-tdfa-text.
...
See https://github.com/haskell-hvr/regex-tdfa/issues/4
2020-01-26 18:54:34 +00:00
Brian McKenna
c02177dd7e
Only use source fixed output path if SHA256 algorithm
2019-06-25 22:11:57 +05:30
Shea Levy
671d3c58dd
Derive Ord for StorePath
2019-04-05 05:45:22 -04:00
Shea Levy
b6e9680437
StorePath: Derive Eq to make StorePathSet usable.
2019-04-03 06:50:52 -04:00
Brian McKenna
21d3eaf84c
Add makeFixedOutputPath
2019-03-28 08:45:19 +05:30
Shea Levy
6e4b72f021
Add type for metadata about StorePaths.
...
This is a stronger-typed version of ValidPathInfo, so this fixes #43 .
2019-03-27 12:04:56 -04:00
Shea Levy
61a536504d
makeStorePath: Generalize toall named hash algorithms.
2019-03-24 16:50:02 -04:00
Shea Levy
f2beabb10f
Remove as-yet unused System.Nix.Build
2019-03-23 10:52:00 -04:00
Shea Levy
2ad76d2b8b
Fix build on GHC 8.4
2019-03-22 10:00:08 -04:00
Shea Levy
a9312d91d3
Remove now-unused System.Nix.Path
2019-03-22 09:45:19 -04: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
194261bffa
KnownStoreDir: Note pathiness requirement in haddocks.
2019-03-22 09:40:16 -04:00
Shea Levy
8fa011942e
ReadonlyStore: Update to use new StorePath module.
2019-03-22 09:21:30 -04:00
Shea Levy
aabde18a4a
Move FilePathPart from Path.hs to Nar.hs.
...
This has nothing to do with store paths...
2019-03-22 08:57:51 -04:00
Shea Levy
03d9a212e8
Remove GC types.
...
These are currently unused and are not going to be needed for initial
hnix support. We can resurrect when we have a use case.
2019-03-22 08:52:46 -04:00
Shea Levy
ac24e61148
Remove Derivation types.
...
These are currently unused and are not going to be needed for initial
hnix support. We can resurrect when we have a use case.
2019-03-22 08:50:47 -04:00
Shea Levy
63643e953a
Remove StoreEffects.
...
In its current incarnation it is never used, we will resurrect a much
simpler pared-down version based on hnix's actual needs later.
2019-03-22 08:46:43 -04:00
Shea Levy
99e7950803
Add type for sets of StorePaths.
2019-03-22 08:38:02 -04:00
Shea Levy
6011a2e1e0
Build.hs: Drop redundant dependency on System.Nix.Path
2019-03-22 08:26:15 -04:00
Shea Levy
6e1e6fc642
Add System.Nix.StorePath, successor to System.Nix.Path.
...
The new type acknowledges the store root, and is better named.
Future work will migrate all dependents and retire the old module.
2019-03-22 08:26:08 -04:00
Shea Levy
d26c5922cb
Base32: No need to concatMap over singleton lists.
2019-03-20 23:59:02 -04:00
Shea Levy
bd0bd95347
Base32: Document the confusing arithmetic.
2019-03-20 21:49:03 -04:00
Shea Levy
8d1e39acb0
Base32: Lift some helpers up for clarity
2019-03-20 21:37:04 -04:00
Shea Levy
91105c05c6
Lorri + direnv.
2019-03-19 20:52:25 -04:00
Shea Levy
0f50f40ffb
Hackage-safe
2019-03-18 17:20:31 -04:00
Shea Levy
44b97fbafb
Hash: Haddock tweaks.
2019-03-11 03:29:58 -04:00
Shea Levy
f3f0193892
Hash: Make warning-clean and reduce language extensions.
2019-03-11 03:29:06 -04:00
Shea Levy
a8aaa9b534
Rename HasDigest to ValidAlgo.
2019-03-11 03:14:34 -04:00
Shea Levy
715f415eb7
Flesh out haddocks for the hashing module.
2019-03-11 03:09:50 -04:00
Shea Levy
b7c2216932
Move bytestring-level base32 encoding to its own module.
2019-03-11 02:42:50 -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
Shea Levy
3ad41dc6f6
Remove value-level hash algorithms.
...
We can use NamedHashAlgorithm to get a name where relevant, and soon
the pair of (recursive, Proxy) :: (Bool, Proxy algo) will be replaced
with a separate type which will let us drop the proxies.
Also, we drop logic from addToStore in the remote impl that was copied
from C++ compatibility code for very old daemon versions.
2019-03-10 19:07:17 -04:00
Shea Levy
20e7b039d0
Rename HashAlgoText to NamedAlgo.
2019-03-10 18:51:24 -04:00
Shea Levy
7b918a929a
System.Nix.Hash: Remove unused pragmas and cleanup.
2019-03-10 18:39:20 -04:00
John Ericson
8cc6595803
Merge pull request #31 from haskell-nix/je-printHashBytes32-bit-fiddling
...
Weird bit fiddling to make `printHashBytes32` work
2019-03-10 13:35:29 -04:00
John Ericson
3fde7c1580
Merge remote-tracking branch 'origin/master' into add-to-store
2019-03-10 13:21:18 -04:00
John Ericson
ecf4d991f9
Add comment to the mysterious order of the + 1
- 1
in printHashBytes32
2019-03-10 13:09:45 -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
Doug Beardsley
7067c32a9a
Implement readonly store path hashing
2019-03-09 22:42:23 -05:00
John Ericson
0fe7ff5e84
Weird bit fiddling to make printHashBytes32
work
2019-03-09 22:03:28 -05:00
Shea Levy
0367156509
Local shell.nixes to make flycheck happy.
2019-03-09 19:04:11 -05:00
Shea Levy
440dfebc28
Build expressions.
2019-03-09 18:32:01 -05:00
Greg Hale
4c650ca750
WIP addToStore protocol implementation
2018-12-28 19:28:11 -05:00
Greg Hale
a7120f60cc
Reflect type level hash algo to value
2018-12-28 19:28:11 -05:00
Greg Hale
7bd991a52e
add nix expressions for building hnix-store-*
2018-12-28 11:00:31 -05: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
966aa4a782
Remove cryptonite, foundation, basement and memory from all packages
2018-09-30 19:05:10 -04:00
Greg Hale
d23195c710
Fix haddock formatting
2018-09-11 23:29:42 -04: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
Doug Beardsley
007a2107d6
Delete old comment
2018-08-05 14:39:59 -04:00
Doug Beardsley
bc946a40b1
Expand Derivation data type
2018-08-05 12:16:29 -04:00
Shea Levy
7a9fcdb22f
Duplicate information to appease bad tooling
2018-08-05 10:58:17 -04:00
Richard Marko
c37c3017e5
Extend core types
2018-07-16 09:09:23 +02:00
Greg Hale
7f1928edcb
Add NAR parser-generator and tests
2018-05-15 11:09:20 -04:00
Greg Hale
9b673371a6
Merge branch 'master' of github.com:haskell-nix/hnix-store
2018-04-30 03:06:07 -07:00
Greg Hale
2ba0a4bea0
Add provisional NAR parser and generator
2018-04-30 03:01:14 -07:00
Shea Levy
da0f19a65f
Merge branch 'addFile' of git://github.com/rpglover64/hnix-store
2018-04-29 15:34:03 -07:00
Alex Rozenshteyn
2cde70f249
Make the bytestring lazy
2018-04-29 15:29:47 -07:00
Alex Rozenshteyn
cf214ad2c3
Add effect for adding file to store
2018-04-29 13:55:48 -07:00
Gabriel Gonzalez
e750f60609
Permit validPaths
to use effects
...
According to @shlevy, whether or not a rooted path is a valid path is
not an intrinsic property of the rooted path and requires a side effect
to determine, so this change modifies the `StoreEffects` record to
reflect that.
2018-04-29 13:44:35 -07:00
Shea Levy
972e2c706f
StoreEffects: Add pathFromHashPart.
2018-04-28 03:44:26 -07:00
Shea Levy
49c1017f0e
StoreEffects: Add derivationOutputNames.
2018-04-28 03:41:48 -07:00
Shea Levy
c7d367f54c
StoreEffects: Add derivationOutputs
2018-04-28 03:39:51 -07:00
Shea Levy
ad6f613c6c
Add validDerivers
2018-04-28 03:37:31 -07:00
Shea Levy
12a75f5c47
validPath -> validPaths.
...
We don't need both.
2018-04-27 19:50:03 -07:00
Shea Levy
3c23fed2ac
ReadonlyStoreEffects -> StoreEffects.
...
We can break out into readonly or binary cache or whatever later if need be.
2018-04-27 19:49:38 -07:00
Shea Levy
561fda594b
ReadonlyStoreEffects: Add subtistutable path info query
2018-04-27 05:49:42 -07:00
Shea Levy
ead433277e
ReadonlyStoreEffects: Add rootedPath operation.
2018-04-27 05:37:49 -07:00
Shea Levy
f21f036d7e
ReadonlyStoreEffects: Add a referrers query.
2018-04-27 05:12:41 -07:00
Shea Levy
f086a5c5a9
isValidPath -> validPath
2018-04-27 04:51:35 -07:00
Shea Levy
02e1adf263
ReadonlyStoreEffects: Operate over rooted and valid paths.
2018-04-27 04:48:29 -07:00
Shea Levy
f26c6edd26
Truncated hash: Remove bogus Coercible constraint.
...
We can never satisfy it because Digest's constructor isn't exported.
2018-04-27 04:37:02 -07:00
Shea Levy
5629a13b1e
Add isValidPath effect.
2018-04-26 21:42:56 -07:00
Shea Levy
8b7a367021
Add store path type.
2018-04-26 21:33:06 -07:00
Shea Levy
d0fd35ba81
Formatting tweak
2018-04-26 08:37:20 -07:00
Shea Levy
d1e08a7a48
Truncated cryptographic hashes implementation.
2018-04-26 08:17:03 -07:00