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)
|
, ("bloomfilter", VERSION_bloomfilter)
|
||||||
, ("http-client", VERSION_http_client)
|
, ("http-client", VERSION_http_client)
|
||||||
, ("persistent-sqlite", VERSION_persistent_sqlite)
|
, ("persistent-sqlite", VERSION_persistent_sqlite)
|
||||||
|
#ifdef WITH_CRYPTON
|
||||||
|
, ("crypton", VERSION_crypton)
|
||||||
|
#else
|
||||||
, ("cryptonite", VERSION_cryptonite)
|
, ("cryptonite", VERSION_cryptonite)
|
||||||
|
#endif
|
||||||
, ("aws", VERSION_aws)
|
, ("aws", VERSION_aws)
|
||||||
, ("DAV", VERSION_DAV)
|
, ("DAV", VERSION_DAV)
|
||||||
#ifdef WITH_TORRENTPARSER
|
#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
|
* push: When on an adjusted branch, propagate changes to parent branch
|
||||||
before updating export remotes.
|
before updating export remotes.
|
||||||
* lookupkey: Added --ref option.
|
* 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
|
-- 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 as T
|
||||||
import qualified Data.Text.Encoding as T
|
import qualified Data.Text.Encoding as T
|
||||||
import Data.IORef
|
import Data.IORef
|
||||||
import "cryptonite" Crypto.MAC.HMAC hiding (Context)
|
import Crypto.MAC.HMAC hiding (Context)
|
||||||
import "cryptonite" Crypto.Hash
|
import Crypto.Hash
|
||||||
|
|
||||||
sha1 :: L.ByteString -> Digest SHA1
|
sha1 :: L.ByteString -> Digest SHA1
|
||||||
sha1 = hashlazy
|
sha1 = hashlazy
|
||||||
|
|
|
@ -165,6 +165,9 @@ Flag TorrentParser
|
||||||
Flag MagicMime
|
Flag MagicMime
|
||||||
Description: Use libmagic to determine file MIME types
|
Description: Use libmagic to determine file MIME types
|
||||||
|
|
||||||
|
Flag Crypton
|
||||||
|
Description: Use the crypton library rather than the no longer maintained cryptonite
|
||||||
|
|
||||||
Flag Benchmark
|
Flag Benchmark
|
||||||
Description: Enable benchmarking
|
Description: Enable benchmarking
|
||||||
Default: True
|
Default: True
|
||||||
|
@ -254,7 +257,6 @@ Executable git-annex
|
||||||
stm-chans,
|
stm-chans,
|
||||||
securemem,
|
securemem,
|
||||||
crypto-api,
|
crypto-api,
|
||||||
cryptonite (>= 0.23),
|
|
||||||
memory,
|
memory,
|
||||||
deepseq,
|
deepseq,
|
||||||
split,
|
split,
|
||||||
|
@ -294,6 +296,12 @@ Executable git-annex
|
||||||
if os(linux) || os(freebsd)
|
if os(linux) || os(freebsd)
|
||||||
GHC-Options: -optl-Wl,--as-needed
|
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))
|
if (os(windows))
|
||||||
Build-Depends:
|
Build-Depends:
|
||||||
Win32 ((>= 2.6.1.0 && < 2.12.0.0) || >= 2.13.4.0),
|
Win32 ((>= 2.6.1.0 && < 2.12.0.0) || >= 2.13.4.0),
|
||||||
|
|
|
@ -8,6 +8,7 @@ flags:
|
||||||
dbus: false
|
dbus: false
|
||||||
debuglocks: false
|
debuglocks: false
|
||||||
benchmark: true
|
benchmark: true
|
||||||
|
crypton: false
|
||||||
packages:
|
packages:
|
||||||
- '.'
|
- '.'
|
||||||
resolver: lts-18.13
|
resolver: lts-18.13
|
||||||
|
|
|
@ -8,6 +8,7 @@ flags:
|
||||||
dbus: false
|
dbus: false
|
||||||
debuglocks: false
|
debuglocks: false
|
||||||
benchmark: true
|
benchmark: true
|
||||||
|
crypton: false
|
||||||
packages:
|
packages:
|
||||||
- '.'
|
- '.'
|
||||||
resolver: nightly-2023-08-01
|
resolver: nightly-2023-08-01
|
||||||
|
|
|
@ -8,6 +8,7 @@ flags:
|
||||||
dbus: false
|
dbus: false
|
||||||
debuglocks: false
|
debuglocks: false
|
||||||
benchmark: false
|
benchmark: false
|
||||||
|
crypton: false
|
||||||
packages:
|
packages:
|
||||||
- '.'
|
- '.'
|
||||||
extra-deps:
|
extra-deps:
|
||||||
|
|
Loading…
Reference in a new issue