cabal-version:       2.4
name:                purebred
version:             2022.1
synopsis:            An mail user agent built around notmuch
description:
  .
  An MUA built around <https://notmuchmail.org/ notmuch>.
  Mutt-inspired console interface, but embracing the notmuch
  storage / search paradigm.
  .
  = Requirements
  .
  * GHC >= 8.8
  * notmuch
  * a local mailer (e.g. @sendmail@)
  .
  = Status
  .
  The project is in development and is not ready for serious use.
  Contributions are welcome (bug reports, feedback, doc, code, etc).
  See HACKING for more info.

homepage:            https://github.com/purebred-mua/purebred#readme
license:             AGPL-3.0-or-later
license-file:        LICENSE
author:              RĂ³man Joost & Fraser Tweedale
maintainer:          frase@frase.id.au
copyright:           2017-2022  Purebred contributors
category:            Email
build-type:          Simple

-- these wildcard expressions require cabal >= 2.4
extra-source-files:
  README.md
  test/data/Maildir/**/*.url
  "test/data/Maildir/**/*.url_2,RS"
  configs/purebred.hs

tested-with:
  GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.4 || ==9.4.2

source-repository head
  type: git
  location: https://github.com/purebred-mua/purebred.git

flag with_lazyvector
  description: Enables lazy loading of the thread listing (see issue #284 before enabling).
  default: False

library
  hs-source-dirs:      src
  ghc-options:         -Wall
  default-language:    Haskell2010
  exposed-modules:     Purebred
                     , Purebred.Config
                     , Purebred.Plugin
                     , Purebred.Plugin.TweakConfig
                     , Purebred.Storage.Mail
                     , Purebred.Storage.Tags
                     , Purebred.System
                     , Purebred.System.Process
                     , Purebred.System.Logging
                     , Purebred.Types
                     , Purebred.Types.Display
                     , Purebred.Types.Error
                     , Purebred.Types.Event
                     , Purebred.Types.LazyVector
                     , Purebred.Types.Mailcap
                     , Purebred.Types.Parser.ByteString
                     , Purebred.Types.Parser.Text
                     , Purebred.Types.UI
                     , Purebred.UI.Actions
                     , Purebred.UI.App
                     , Purebred.UI.ComposeEditor.Keybindings
                     , Purebred.UI.ComposeEditor.Main
                     , Purebred.UI.Draw.Main
                     , Purebred.UI.FileBrowser.Keybindings
                     , Purebred.UI.FileBrowser.Main
                     , Purebred.UI.GatherHeaders.Keybindings
                     , Purebred.UI.Help.Keybindings
                     , Purebred.UI.Help.Main
                     , Purebred.UI.Index.Keybindings
                     , Purebred.UI.Index.Main
                     , Purebred.UI.Keybindings
                     , Purebred.UI.Mail.Keybindings
                     , Purebred.UI.Mail.Main
                     , Purebred.UI.Notifications
                     , Purebred.UI.Status.Main
                     , Purebred.UI.Utils
                     , Purebred.UI.Validation
                     , Purebred.UI.Views
                     , Purebred.UI.Widgets
                     , Purebred.Version
                     , Purebred.Brick.Markup
                     , Data.Text.Markup
  other-modules:       Paths_purebred
                     , Purebred.Storage.Client
                     , Purebred.Storage.Server
                     , Purebred.Types.IFC
                     , Purebred.Types.Items
                     , Purebred.Plugin.Internal
                     , Purebred.Plugin.UserAgent
  autogen-modules:     Paths_purebred
  build-depends:       base >= 4.13 && < 5
                     , stm >= 2.4
                     , stm-delay >= 0.1
                     , deepseq >= 1.4.2
                     , dyre >= 0.9.1
                     , lens
                     , brick >= 1.0 && < 1.3
                     , text-zipper
                     , vty
                     , vector >= 0.12.0.0
                     , notmuch >= 0.3.1 && < 0.4
                     , text
                     , typed-process >= 0.2.8.0
                     , directory >= 1.2.5.0
                     , bytestring
                     , time >= 1.8
                     , case-insensitive
                     , optparse-applicative >= 0.13
                     , filepath
                     , mtl
                     , exceptions
                     , purebred-email >= 0.5 && < 0.7
                     , attoparsec
                     , containers
                     , mime-types
                     , random >= 1.2.0
                     , time
                     , temporary
                     , word-wrap

  if flag(with_lazyvector)
    cpp-options: -DLAZYVECTOR

executable purebred
  hs-source-dirs:      app
  ghc-options:         -Wall -threaded
  main-is:             Main.hs
  default-language:    Haskell2010
  build-depends:       base
                     , purebred

test-suite unit
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  ghc-options:         -Wall
  main-is:             Main.hs
  other-modules:       TestMail
                     , TestActions
                     , TestTagParser
                     , TestTextParser
                     , LazyVector
  default-language:    Haskell2010
  build-depends:       base
                     , purebred
                     , tasty
                     , tasty-hunit
                     , tasty-quickcheck
                     , quickcheck-instances
                     , bytestring
                     , text
                     , lens
                     , notmuch
                     , time
                     , brick
                     , vector
                     , attoparsec

test-suite uat
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  ghc-options:         -Wall -threaded
  main-is:             TestUserAcceptance.hs
  default-language:    Haskell2010
  build-depends:       base
                     , purebred-email
                     , tasty
                     , tasty-hunit
                     , tasty-tmux >= 0.1.0.2
                     , directory
                     , typed-process >= 0.2.4.0
                     , text
                     , bytestring
                     , temporary
                     , mtl
                     , lens
                     , filepath
                     , unix