Commit Graph

98 Commits

Author SHA1 Message Date
squalus
3710c6a445 add signature decoding
- add NarSignature decoding
- use cryptonite instead of saltine for signature
- remove saltine dependency
- add signature decode and verify tests taken from tvix
- start decoding signatures in queryPathInfoUncached

Closes #240 and #246
2023-11-22 15:19:03 -08:00
Richard Marko
cce2c98426 move getStoreDir to remote, drop mtl from core 2023-11-22 11:30:10 +01:00
Richard Marko
4b481cff41 core: sort deps in cabal file 2023-11-22 11:16:17 +01:00
Richard Marko
9a333cc1f0 core: rename format-tests testsuite to core 2023-11-22 11:16:17 +01:00
Richard Marko
317603038e core: set me as a maintainer 2023-11-22 11:16:17 +01:00
Richard Marko
69a02d3066 init hnix-store-nar
Closes #233
2023-11-22 11:16:17 +01:00
Richard Marko
72524cfc09 init hnix-store-readonly
Closes #235
2023-11-22 10:44:46 +01:00
Richard Marko
8ac46de0bd Recursive -> FileIngestionMethod, remove Bools
Actually the same thing, now with prefixed constructors
for extra clarity.

Closes #238
2023-11-22 09:07:14 +01:00
Richard Marko
f6b06e0005 Add tests for ReadOnlyStore 2023-11-22 09:07:14 +01:00
Richard Marko
3c98e4ca5d core: add lower bound to base64-bytestring
Related to #175
2023-11-20 09:22:05 +01:00
Richard Marko
3470625581 core: add lower bound to base16-bytestring, remove CPP
Related to #175
2023-11-20 09:22:05 +01:00
Richard Marko
49dc678060 bump core version to 0.8, add lower bound to db & test
bump for remote
2023-11-20 09:22:05 +01:00
Richard Marko
42f56f504f hnix-store-tests: init
Split from `-core` so it doesn't depend on quickcheck,
generic-arbitrary and quickcheck-instances that could propagate downstrem.
Also allows users to defined their own.

With all roundtrip property tests.

Later this should also absorb test nix-store/daemon harness from
`-remote` so it can be reused by others.
2023-11-20 09:22:05 +01:00
Richard Marko
30e7f18008 core: remove duplicate StandaloneDeriving 2023-11-19 15:12:08 +01:00
Richard Marko
8ccc703478 core: allow dependent-sum-template 0.2.0.0 2023-11-19 08:57:22 +01:00
Richard Marko
e8474eebf7 core: add roundtrip prop for DerivedPath 2023-11-19 07:07:41 +01:00
Cale Gibbard
d832d9a622 core: add System.Nix.DerivedPath
Co-Authored-By: Richard Marko <srk@48.io>
2023-11-19 07:07:41 +01:00
John Ericson
ce0b3606f0 Replace SomeNamedDigest with DSum HashAlgo Digest
Co-Authored-By: Richard Marko <srk@48.io>
2023-11-18 18:45:42 +01:00
Richard Marko
6160cfd523 core: StorePathMetadata -> StorePath.Metadata 2023-11-18 18:44:44 +01:00
John Ericson
7186850478 core: System.Nix.Hash add HashAlgo
prereq for replacing SomeNamedDigest
with (DSum HashAlgo Digest)
2023-11-18 13:02:55 +01:00
Richard Marko
bb2184f5e0 ContentAddressableAddress -> ContentAddress, separate module 2023-11-18 11:19:07 +01:00
Richard Marko
2fbb602896 core: move default-language to common stanza 2023-11-18 09:22:34 +01:00
Richard Marko
894db979db core: move extensions to common stanza
Sensibly
2023-11-17 19:59:34 +01:00
Richard Marko
86a7b58620 core: drop relude
I prefer explicit imports vs magic and this causes
an unused packages warning to pop (with no workaround or fix in sight).
2023-11-17 19:55:26 +01:00
John Ericson
a2f35861da Squash away internal
Closes #234
2023-11-17 19:55:26 +01:00
Richard Marko
2e1cab22b3 move ContentAddressableAddress builder and parser to core, add roundtrip prop 2023-11-17 08:03:40 +01:00
Richard Marko
b80ee47f6a Add Default StoreDir instance 2023-11-16 13:25:20 +01:00
Richard Marko
3e26a0dd2f core: add GenericArbitrary derived instances
for `Build` and `Derivation` modules.

Switch derivation path parser to use
`Nix.Derivation.textParser` like `nix-derivation` does.
2023-11-15 18:36:28 +01:00
Richard Marko
34e788e312 core: add RecordWildCards, ScopedTypeVariables to default-extensions 2023-11-15 18:36:28 +01:00
Richard Marko
82fc838af0 ChangeLog.md -> CHANGELOG.md, add README.lhs for remote 2023-11-15 08:42:56 +01:00
Richard Marko
5dc1802665 core: move Arbitrary instances near their types
This allows us to use them in remote serialization
round trip props.

Couple of them are not needed anymore (`NixLike` is the
default now) so whole `tests/Arbitrary` is gone.
2023-11-15 08:29:49 +01:00
Richard Marko
f9edde00ca core: add case-conflict.nar fixture to extra-source-files 2023-11-15 07:46:29 +01:00
Richard Marko
242c475993 Bump core to 0.7
Related to #227
2023-11-14 09:31:04 +01:00
Sander
0092a2952f
Implement case-insensitive hack 2023-11-13 17:13:44 +04:00
Richard Marko
bfede6f650 core: Allow algebraic-graphs 0.7 2023-11-11 19:00:20 +01:00
Richard Marko
81700e6e7c Release core 0.6.1 2023-01-02 12:13:57 +01:00
Richard Marko
86cec2f801 Release core 0.6 2022-06-06 09:52:24 +02:00
Richard Marko
df0dd83f11 core: allow algebraic-graphs 0.6
Closes #180.
2022-03-07 17:17:40 +01:00
Anton-Latukha
aecfd03ecd dep: Core,Remote: relude >= 1.0 2022-02-21 14:31:01 +01:00
Anton-Latukha
8e3955f6a1
Core: cabal: declare default-extensions 2021-08-06 19:29:01 +03:00
Anton-Latukha
ef6343be35
Core: use relude as Prelude 2021-08-06 17:55:32 +03:00
Anton-Latukha
3f5d9092df
{Code, Remote}: require base >=4.12 (GHC 8.6) 2021-08-06 17:43:22 +03:00
Anton-Latukha
98da3481db Core: proclaim 0.5 2021-06-10 17:23:23 +03:00
Anton-Latukha
97146b41cc
treewide: migrate crypto(hash-* -> nite)
Reference:

Main cause:

https://github.com/haskell-hvr/cryptohash-sha512/issues/7

The whole `cryptohash-*` package family is abandoned, there is no
signs of maintainer activity there, so it stopped following Haskell ecosystem &
`base` releases. Knowing the human history & situation around it - it would not
be reviwed, which gives experience to not hardcode on the (specifically when
emotional) dependency.

Experience I drawn from this story is to keep things simplier when possible &
have more flexible systems as a result code.
It was "a bit too much" for what hashing is, for the code to have 2 hashing type
systems (external & internal) & reinventment of `HashAlgorithm` type duplicate.
The whole code was really rigid with a lot of type applicating the data kinds,
those are dependent type features & should be used cautiously, since interface
became rigid to changes, so afterwards it is easier & effective to dismantle
and recreate the subsystem then to evolve it.

Previous hashing history:
https://github.com/haskell-nix/hnix-store/issues/156
https://github.com/haskell-nix/hnix-store/issues/142
https://github.com/haskell-nix/hnix-store/pull/93
https://github.com/haskell-nix/hnix-store/issues/92
https://github.com/haskell-nix/hnix-store/issues/90
https://github.com/haskell-nix/hnix-store/issues/83
https://github.com/haskell-nix/hnix-store/pull/64
https://github.com/haskell-nix/hnix-store/pull/38
https://github.com/haskell-nix/hnix-store/pull/32
https://github.com/haskell-nix/hnix-store/pull/31
https://github.com/haskell-nix/hnix-store/pull/28
https://github.com/haskell-nix/hnix-store/pull/27
https://github.com/haskell-nix/hnix-store/pull/25
https://github.com/haskell-nix/hnix-store/issues/18
https://github.com/haskell-nix/hnix-store/pull/14
2021-06-10 15:17:40 +03:00
Anton-Latukha
8ddca09609
Core: Internal: add module Truncation 2021-06-10 13:18:41 +03:00
Anton-Latukha
79b461962f
Core: Internal: form Base
It is tiny, but it is a start of separation of the Base encodings from hashing subsystem.
2021-06-10 13:18:40 +03:00
Anton Latukha
0eb0e023c9
{Core, Remote}: proclaim 0.4.3.1 (#155) 2021-05-30 21:06:23 +03:00
Anton Latukha
b4377c753a
Release 0.4.3 (#153)
* Core: ChangeLog: add 0.4.3.0 section

* Remote: ChangeLog: add 0.4.3.0 section

* {Core, Remote}: cabal: proclaim 0.4.3.0
2021-05-30 18:55:50 +03:00
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
9dd468cbe2
Core: cabal: layout 2021-03-16 10:59:04 +02:00