cabal-version:    3.0
name:             zenith
version:          0.7.1.0-beta
license:          MIT
license-file:     LICENSE
author:           Rene Vergara
maintainer:       pitmutt@vergara.tech
copyright:        (c) 2022-2024 Vergara Technologies LLC
build-type:       Custom
category:         Blockchain
extra-doc-files:
  README.md
  CHANGELOG.md
  zenith.cfg


custom-setup
  setup-depends:
      base >= 4.12 && < 5
    , Cabal >= 3.2.0.0
    , directory >= 1.3.6.0
    , filepath >= 1.3.0.2
    , regex-base
    , regex-compat

library
  ghc-options: -Wall -Wunused-imports
  exposed-modules:
    Zenith.CLI
    Zenith.GUI
    Zenith.GUI.Theme
    Zenith.Core
    Zenith.DB
    Zenith.Types
    Zenith.Utils
    Zenith.Zcashd
    Zenith.Scanner
    Zenith.RPC
    Zenith.Tree
  hs-source-dirs:
    src
  build-depends:
      Clipboard
    , Hclip
    , JuicyPixels
    , aeson
    , array
    , ascii-progress
    , async
    , base >=4.12 && <5
    , base64-bytestring
    , binary
    , borsh
    , brick
    , bytestring
    , configurator
    , data-default
    , directory
    , esqueleto
    , exceptions
    , filepath
    , ghc
    , generics-sop
    , haskoin-core
    , hexstring
    , http-client
    , http-conduit
    , http-types
    , microlens
    , microlens-mtl
    , microlens-th
    , monad-logger
    , transformers
    , monomer
    , mtl
    , persistent
    , persistent-sqlite
    , persistent-template
    , process
    , pureMD5
    , qrcode-core
    , qrcode-juicypixels
    , regex-base
    , regex-compat
    , regex-posix
    , resource-pool
    , scientific
    , secp256k1-haskell >= 1
    , servant-server
    , text
    , text-show
    , time
    , uuid
    , vector
    , vty
    , vty-crossplatform
    , word-wrap
    , zcash-haskell
  --pkgconfig-depends: rustzcash_wrapper
  default-language: Haskell2010

executable zenith
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  main-is: Main.hs
  hs-source-dirs:
    app
  build-depends:
      base >=4.12 && <5
    , brick
    , bytestring
    , configurator
    , data-default
    , sort
    --, structured-cli
    , text
    , time
    , zenith
    , zcash-haskell
  pkgconfig-depends: rustzcash_wrapper
  default-language: Haskell2010

executable zenithserver
  ghc-options: -main-is Server -threaded -rtsopts -with-rtsopts=-N
  main-is: Server.hs
  hs-source-dirs:
    app
  build-depends:
      base >=4.12 && <5
    , configurator
    , monad-logger
    , wai-extra
    , warp
    , servant-server
    , text
    , unix
    , zcash-haskell
    , zenith
  pkgconfig-depends: rustzcash_wrapper
  default-language: Haskell2010

test-suite zenith-tests
  type: exitcode-stdio-1.0
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  main-is: Spec.hs
  hs-source-dirs:
    test
  build-depends:
      base >=4.12 && <5
    , bytestring
    , aeson
    , configurator
    , monad-logger
    , borsh
    , aeson
    , data-default
    , sort
    , text
    , time
    , persistent
    , persistent-sqlite
    , hspec
    , hexstring
    , HUnit
    , directory
    , zcash-haskell
    , zenith
  pkgconfig-depends: rustzcash_wrapper
  default-language: Haskell2010

test-suite zenithserver-tests
  type: exitcode-stdio-1.0
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  main-is: ServerSpec.hs
  hs-source-dirs:
    test
  build-depends:
      base >=4.12 && <5
    , bytestring
    , aeson
    , configurator
    , monad-logger
    , data-default
    , sort
    , text
    , time
    , uuid
    , http-conduit
    , persistent
    , persistent-sqlite
    , hspec
    , hexstring
    , warp
    , servant-server
    , HUnit
    , directory
    , zcash-haskell
    , zenith
  pkgconfig-depends: rustzcash_wrapper
  default-language: Haskell2010