Support being built with crypton rather than cryptonite
crypton is a fork of cryptonite, and cryptonite's github repo has been archived. Some deps are already using cryptonite so it's clearly the way forward. Added a build flag without a default, so cabal configure will select on its own which to use. stack files pin to cryptonite for now. Sponsored-by: Nicholas Golder-Manning on Patreon
This commit is contained in:
parent
e03e907705
commit
54da44d42a
7 changed files with 19 additions and 3 deletions
|
@ -75,7 +75,11 @@ dependencyVersions = map fmt $ sortBy (comparing (CI.mk . fst))
|
|||
, ("bloomfilter", VERSION_bloomfilter)
|
||||
, ("http-client", VERSION_http_client)
|
||||
, ("persistent-sqlite", VERSION_persistent_sqlite)
|
||||
#ifdef WITH_CRYPTON
|
||||
, ("crypton", VERSION_crypton)
|
||||
#else
|
||||
, ("cryptonite", VERSION_cryptonite)
|
||||
#endif
|
||||
, ("aws", VERSION_aws)
|
||||
, ("DAV", VERSION_DAV)
|
||||
#ifdef WITH_TORRENTPARSER
|
||||
|
|
|
@ -12,6 +12,7 @@ git-annex (10.20230829) UNRELEASED; urgency=medium
|
|||
* push: When on an adjusted branch, propagate changes to parent branch
|
||||
before updating export remotes.
|
||||
* lookupkey: Added --ref option.
|
||||
* Support being built with crypton rather than cryptonite.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Mon, 28 Aug 2023 13:10:17 -0400
|
||||
|
||||
|
|
|
@ -76,8 +76,8 @@ import qualified Data.ByteString.Lazy as L
|
|||
import qualified Data.Text as T
|
||||
import qualified Data.Text.Encoding as T
|
||||
import Data.IORef
|
||||
import "cryptonite" Crypto.MAC.HMAC hiding (Context)
|
||||
import "cryptonite" Crypto.Hash
|
||||
import Crypto.MAC.HMAC hiding (Context)
|
||||
import Crypto.Hash
|
||||
|
||||
sha1 :: L.ByteString -> Digest SHA1
|
||||
sha1 = hashlazy
|
||||
|
|
|
@ -165,6 +165,9 @@ Flag TorrentParser
|
|||
Flag MagicMime
|
||||
Description: Use libmagic to determine file MIME types
|
||||
|
||||
Flag Crypton
|
||||
Description: Use the crypton library rather than the no longer maintained cryptonite
|
||||
|
||||
Flag Benchmark
|
||||
Description: Enable benchmarking
|
||||
Default: True
|
||||
|
@ -254,7 +257,6 @@ Executable git-annex
|
|||
stm-chans,
|
||||
securemem,
|
||||
crypto-api,
|
||||
cryptonite (>= 0.23),
|
||||
memory,
|
||||
deepseq,
|
||||
split,
|
||||
|
@ -294,6 +296,12 @@ Executable git-annex
|
|||
if os(linux) || os(freebsd)
|
||||
GHC-Options: -optl-Wl,--as-needed
|
||||
|
||||
if flag(Crypton)
|
||||
Build-Depends: crypton
|
||||
CPP-Options: -DWITH_CRYPTON
|
||||
else
|
||||
Build-Depends: cryptonite (>= 0.23)
|
||||
|
||||
if (os(windows))
|
||||
Build-Depends:
|
||||
Win32 ((>= 2.6.1.0 && < 2.12.0.0) || >= 2.13.4.0),
|
||||
|
|
|
@ -8,6 +8,7 @@ flags:
|
|||
dbus: false
|
||||
debuglocks: false
|
||||
benchmark: true
|
||||
crypton: false
|
||||
packages:
|
||||
- '.'
|
||||
resolver: lts-18.13
|
||||
|
|
|
@ -8,6 +8,7 @@ flags:
|
|||
dbus: false
|
||||
debuglocks: false
|
||||
benchmark: true
|
||||
crypton: false
|
||||
packages:
|
||||
- '.'
|
||||
resolver: nightly-2023-08-01
|
||||
|
|
|
@ -8,6 +8,7 @@ flags:
|
|||
dbus: false
|
||||
debuglocks: false
|
||||
benchmark: false
|
||||
crypton: false
|
||||
packages:
|
||||
- '.'
|
||||
extra-deps:
|
||||
|
|
Loading…
Reference in a new issue