Commit Graph

59 Commits

Author SHA1 Message Date
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
Anton-Latukha
c677ecdb3b
Core: cabal: make -rtsopts a part of the bounded-memory flag 2021-03-16 10:59:04 +02:00
Anton Latukha
3068acd592
Core, Remote: version 0.4.2.0 (Cabal ver & ChangeLogs)
* Core: ChangeLog: add recent changes

* Remote: ChangeLog: add recent changes

* Core, Remote: version `0.4.2.0`
2021-03-12 19:38:54 +02:00
Anton Latukha
5d03ffc43c
Declare tasty-discover a testing build tool (#130)
This properly fixes the use of the tasty-discover,
the report & info were sent upstream to fix it in docs:
https://github.com/haskell-works/tasty-discover/issues/4.
Closes: #129
2021-01-19 13:08:32 +02:00
Anton-Latukha
9c58218c28
Core: prepare 0.4.1.0: cabal version, ChangeLog
M  hnix-store-core/hnix-store-core.cabal
2021-01-16 09:35:10 +02:00
Anton-Latukha
f325cdb7ca Core, Remote: tasty-discover dep: rm from Cabal desc, add to Nix drv
`tasty-discover` is a run-time executable dependency, it does not belong in the
package description.
2021-01-15 02:43:27 +02:00
Anton Latukha
35b8e2c4b8
Core, Remote: deps clean-up (#117)
Closing: #116
#115 allowed to reduce some deps in descriptions.
2021-01-14 22:20:00 +02:00
Richard Marko
22a3f367d2 core: drop unused io-streams and process-extras deps
Closes #106.
2021-01-06 13:26:32 +01:00
Richard Marko
2779bf9705 treewide: switch to cabal 2.2, add commons stanza with Wall & Wunused-packages 2021-01-06 13:26:32 +01:00
Richard Marko
660cb2f190 treewide: fix cabal file indentation 2021-01-06 13:26:32 +01:00
Richard Marko
3d6487d0e3 Release 0.4 2020-12-30 14:14:57 +01:00
Anton Latukha
43313d0870
hnix-store-{core,remote}: allow also base16-bytestring < 1.0 (#100) 2020-12-30 01:54:31 +02:00
Anton Latukha
4a1c1a2697
Merge request #86: use base16-bytestring >= 1, & updating according tests 2020-12-14 11:47:06 +02: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
Greg Hale
e602dc927a version bump 2020-11-29 09:23:00 -05: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
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
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
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
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
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
f2beabb10f
Remove as-yet unused System.Nix.Build 2019-03-23 10:52:00 -04:00
Shea Levy
a9312d91d3
Remove now-unused System.Nix.Path 2019-03-22 09:45:19 -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
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
0f50f40ffb
Hackage-safe 2019-03-18 17:20:31 -04:00
Shea Levy
b7c2216932
Move bytestring-level base32 encoding to its own module. 2019-03-11 02:42:50 -04:00
John Ericson
3fde7c1580 Merge remote-tracking branch 'origin/master' into add-to-store 2019-03-10 13:21:18 -04:00
Doug Beardsley
7067c32a9a Implement readonly store path hashing 2019-03-09 22:42:23 -05:00
Shea Levy
440dfebc28
Build expressions. 2019-03-09 18:32:01 -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