Commit Graph

325 Commits

Author SHA1 Message Date
sorki
2e54e33bed core: add unsafeMakeStorePathHashPart 2023-11-30 06:59:59 +01:00
sorki
b3a77eaf4a core: Cryptonite -> Crypton in error message 2023-11-30 06:59:59 +01:00
sorki
1702fa0abf core: derive classics for BaseEncoding enum 2023-11-30 06:59:59 +01:00
Richard Marko
5ea5b82b59 prefix BuildMode and BuildResult constructors 2023-11-30 06:59:59 +01:00
Richard Marko
12fa758ae5 core: fix fingerprint functions haddock 2023-11-27 07:45:31 +01:00
squalus
ac7184be2c core: add fingerprints 2023-11-26 11:36:18 -08:00
squalus
7850a38b3a core: add signatureToText function and tests
- make NarSignature's Show instance more legible
- add Arbitrary instance for NarSignature
- add roundtrip quickcheck tests for NarSignature encoding
2023-11-24 12:55:54 -08:00
squalus
c6a579273f switch to crypton
cryptonite is unmaintained. Replace it with crypton.

Closes #239.
2023-11-23 10:22:19 -08:00
Richard Marko
e9a7bbc107 core: add comment for test credits
Related to #240
2023-11-23 06:14:35 +01:00
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
a0a6b0de6a core: CHANGELOG 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
c7e66bb01f hide StorePath constructor, add unsafeMakeStorePath 2023-11-22 09:50:40 +01:00
Richard Marko
a61070144e redo conctructor hiding 2023-11-22 09:43:08 +01:00
Richard Marko
862cceffdc Add PathFilter newtype to System.Nix.Store.Types 2023-11-22 09:11:58 +01:00
Richard Marko
152ce6f8ef add RepairMode to System.Nix.Store.Types 2023-11-22 09:07:14 +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
b1c8603adc core: add custom Show instance for StorePath
before
```
StorePath {storePathHash = StorePathHashPart {unStorePathHashPart = "#F\139i\215:t\134x\151+\206\&8O*\165\STX\DC2\169\234"}, storePathName = StorePathName {unStorePathName = "testFixed"}}
```

after
```
StorePath /iali40m5597kikibjxw8cx1ssxlqnii3-testFixed
```
2023-11-22 09:07:14 +01:00
Richard Marko
13064a91d6 remove .envrc .ghci from subdirs 2023-11-20 09:22:05 +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
631b26e436 core: clean saltine CPP overloads
One year late hah. Thanks Anton!
2023-11-20 09:22:05 +01:00
Richard Marko
541abd1e20 core: Base, wrap comment, trim whitespace 2023-11-20 09:22:05 +01:00
Richard Marko
6690f79f46 core: forgot to export ParseOutputsError 2023-11-20 09:22:05 +01:00
Richard Marko
17d20b5417 core: derivation test, use Text.Lazy.IO 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
c15a127e00 core: re-export Derivation, DerivationOutput 2023-11-19 20:03:11 +01:00
Richard Marko
30e7f18008 core: remove duplicate StandaloneDeriving 2023-11-19 15:12:08 +01:00
Richard Marko
434485d4a4 delete shell.nix from subdirs 2023-11-19 14:49:22 +01:00
Richard Marko
8ccc703478 core: allow dependent-sum-template 0.2.0.0 2023-11-19 08:57:22 +01:00
Richard Marko
cfcb37320c core: DerivedPath, be explicit about dropping !
Co-Authored-By: Luigy Leon <luigy@outlook.com>
2023-11-19 08:56:57 +01:00
Richard Marko
9026abaf5c core: Drop narHash optional TODO 2023-11-19 07:35:37 +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
Richard Marko
82fc29771c core: drop Metadata.path field
Isn't used anywhere and it is better to have
`Map StorePath (Metadata StorePath)`

See also https://github.com/haskell-nix/hnix-store/issues/147#issuecomment-1816414062
2023-11-18 19:02:30 +01:00
Cale Gibbard
a187937be4 rework ContentAddress
Co-Authored-By: Richard Marko <srk@48.io>
2023-11-18 19:02:30 +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
747225cb1a core: StorePath add HasStoreDir, getStoreDir 2023-11-18 18:44:44 +01:00
Richard Marko
6160cfd523 core: StorePathMetadata -> StorePath.Metadata 2023-11-18 18:44:44 +01:00
Richard Marko
ac02887e5b where right after brace 2023-11-18 18:44:44 +01:00
Richard Marko
019d1af51e core: ReadOnlyStore - explicit exports, neaten 2023-11-18 18:44:44 +01:00
Richard Marko
a4618cc95c core: note about Metadata corresponding to ValidPathInfo
I'm not going to rename this one for now.
2023-11-18 18:44:44 +01:00
Richard Marko
83ea6487fd core: move StorePathTrust before Metadata, expand comment mentioning ultimate 2023-11-18 18:44:44 +01:00