From f8f8ebd1371bb10c604a83ac842e235085e3a5e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Mon, 7 Apr 2025 21:10:15 +0200 Subject: Cabal flag to support deprecated cryptonite package --- erebos.cabal | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/erebos.cabal b/erebos.cabal index 0f76deb..0f25e69 100644 --- a/erebos.cabal +++ b/erebos.cabal @@ -39,6 +39,10 @@ Flag ci default: False manual: True +Flag cryptonite + description: Use deprecated 'cryptonite' package + default: False + source-repository head type: git location: https://code.erebosprotocol.net/erebos @@ -147,7 +151,6 @@ library bytestring >=0.10 && <0.13, clock >=0.8 && < 0.9, containers ^>= { 0.6, 0.7, 0.8 }, - crypton ^>= { 0.34, 1.0 }, deepseq >= 1.4 && <1.6, directory >= 1.3 && <1.4, filepath >=1.4 && <1.6, @@ -164,6 +167,13 @@ library uuid >=1.3 && <1.4, zlib >=0.6 && <0.8 + if !flag(cryptonite) + build-depends: + crypton ^>= { 0.34, 1.0 }, + else + build-depends: + cryptonite >=0.25 && <0.31, + if os(windows) hs-source-dirs: src/windows build-depends: @@ -191,7 +201,6 @@ executable erebos build-depends: bytestring, - crypton, directory, erebos, haskeline >=0.7 && <0.9, @@ -203,3 +212,10 @@ executable erebos time, transformers >= 0.5 && <0.7, uuid, + + if !flag(cryptonite) + build-depends: + crypton, + else + build-depends: + cryptonite, -- cgit v1.2.3