cabal-version: 3.4
name: taffybar
version: 4.1.0
synopsis: A desktop bar similar to xmobar, but with more GUI
license: BSD-3-Clause
license-file: LICENSE
author: Ivan Malison
maintainer: IvanMalison@gmail.com
category: System
build-type: Simple
tested-with: GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.6, GHC == 9.8.2
homepage: http://github.com/taffybar/taffybar
data-files:
  taffybar.css
  icons/*.svg
extra-source-files:
  dbus-xml/org.freedesktop.UPower.Device.xml
  dbus-xml/org.freedesktop.UPower.xml
  dbus-xml/org.mpris.MediaPlayer2.Player.xml
  dbus-xml/org.mpris.MediaPlayer2.xml
  test/data/*.golden
extra-doc-files:
  README.md
  CHANGELOG.md
  doc/*.md

flag Deprecated-Pager-Hints
  description: Enables the deprecated System.Taffybar.Support.PagerHints module, which has been moved to xmonad-contrib.

common haskell
  default-extensions:
    DeriveGeneric
    GeneralizedNewtypeDeriving
    LambdaCase
    NumericUnderscores
    StandaloneDeriving
    TupleSections
  default-language: Haskell2010
  build-depends: base >= 4.15.0.0 && < 5
  ghc-options: -Wall

common exe
  ghc-options: -rtsopts -threaded

library
  import: haskell
  default-extensions:
    MonoLocalBinds

  build-depends: HStringTemplate >= 0.8 && < 0.9
               , X11 >= 1.5.0.1
               , aeson
               , ansi-terminal
               , bytestring
               , conduit
               , containers
               , data-default
               , dbus >= 1.2.11 && < 2.0.0
               , dbus-hslogger >= 0.1.0.1 && < 0.2.0.0
               , directory
               , dyre >= 0.9.0 && < 0.10
               , either >= 4.0.0.0
               , enclosed-exceptions >= 1.0.0.1
               , filepath
               , fsnotify >= 0.4 && < 0.5
               , gi-cairo-connector
               , gi-cairo-render
               , gi-gdk >=3.0.6 && <3.1
               , gi-gdkpixbuf >=2.0.6 && <2.1
               , gi-gdkx11
               , gi-glib
               , gi-gtk >= 3.0.26 && < 4
               , gi-gtk-hs >= 0.3.9 && < 0.4
               , gi-pango
               , gtk-sni-tray >= 0.1.8.0
               , gtk-strut >= 0.1.2.1
               , haskell-gi-base >= 0.24
               , hslogger
               , http-conduit
               , http-client >= 0.5
               , http-client-tls
               , http-types
               , multimap >= 1.2.1
               , parsec >= 3.1
               , process >= 1.0.1.1
               , rate-limit >= 1.1.1
               , regex-compat
               , safe >= 0.3 && < 1
               , scotty >= 0.20 && < 0.23
               , split >= 0.1.4.2
               , status-notifier-item >= 0.3.1.0
               , stm
               , template-haskell
               , text
               , time >= 1.9 && < 2.0
               , time-locale-compat >= 0.1 && < 0.2
               , time-units >= 1.0.0
               , transformers >= 0.3.0.0
               , tuple >= 0.3.0.2
               , unix
               , utf8-string
               , xdg-desktop-entry
               , xdg-basedir >= 0.2 && < 0.3
               , xml
               , xml-helpers

  hs-source-dirs: src
  pkgconfig-depends: gtk+-3.0
  exposed-modules: System.Taffybar
                 , System.Taffybar.Auth
                 , System.Taffybar.Context
                 , System.Taffybar.DBus
                 , System.Taffybar.DBus.Toggle
                 , System.Taffybar.Example
                 , System.Taffybar.Hooks
                 , System.Taffybar.Information.Battery
                 , System.Taffybar.Information.CPU
                 , System.Taffybar.Information.CPU2
                 , System.Taffybar.Information.Chrome
                 , System.Taffybar.Information.Crypto
                 , System.Taffybar.Information.DiskIO
                 , System.Taffybar.Information.EWMHDesktopInfo
                 , System.Taffybar.Information.MPRIS2
                 , System.Taffybar.Information.Memory
                 , System.Taffybar.Information.Network
                 , System.Taffybar.Information.SafeX11
                 , System.Taffybar.Information.StreamInfo
                 , System.Taffybar.Information.X11DesktopInfo
                 , System.Taffybar.Information.XDG.Protocol
                 , System.Taffybar.LogFormatter
                 , System.Taffybar.SimpleConfig
                 , System.Taffybar.Util
                 , System.Taffybar.Widget
                 , System.Taffybar.Widget.Battery
                 , System.Taffybar.Widget.CPUMonitor
                 , System.Taffybar.Widget.CommandRunner
                 , System.Taffybar.Widget.Crypto
                 , System.Taffybar.Widget.DiskIOMonitor
                 , System.Taffybar.Widget.FSMonitor
                 , System.Taffybar.Widget.FreedesktopNotifications
                 , System.Taffybar.Widget.Generic.AutoSizeImage
                 , System.Taffybar.Widget.Generic.ChannelGraph
                 , System.Taffybar.Widget.Generic.ChannelWidget
                 , System.Taffybar.Widget.Generic.DynamicMenu
                 , System.Taffybar.Widget.Generic.Graph
                 , System.Taffybar.Widget.Generic.Icon
                 , System.Taffybar.Widget.Generic.PollingBar
                 , System.Taffybar.Widget.Generic.PollingGraph
                 , System.Taffybar.Widget.Generic.PollingLabel
                 , System.Taffybar.Widget.Generic.VerticalBar
                 , System.Taffybar.Widget.Layout
                 , System.Taffybar.Widget.MPRIS2
                 , System.Taffybar.Widget.NetworkGraph
                 , System.Taffybar.Widget.SNITray
                 , System.Taffybar.Widget.SimpleClock
                 , System.Taffybar.Widget.SimpleCommandButton
                 , System.Taffybar.Widget.Text.CPUMonitor
                 , System.Taffybar.Widget.Text.MemoryMonitor
                 , System.Taffybar.Widget.Text.NetworkMonitor
                 , System.Taffybar.Widget.Util
                 , System.Taffybar.Widget.Weather
                 , System.Taffybar.Widget.Windows
                 , System.Taffybar.Widget.Workspaces
                 , System.Taffybar.Widget.WttrIn
                 , System.Taffybar.Widget.XDGMenu.Menu
                 , System.Taffybar.Widget.XDGMenu.MenuWidget
                 , System.Taffybar.WindowIcon

  if flag(Deprecated-Pager-Hints)
    build-depends: xmonad
    exposed-modules: System.Taffybar.Support.PagerHints

  other-modules: Paths_taffybar
               , System.Taffybar.DBus.Client.MPRIS2
               , System.Taffybar.DBus.Client.Params
               , System.Taffybar.DBus.Client.UPower
               , System.Taffybar.DBus.Client.UPowerDevice
               , System.Taffybar.DBus.Client.Util

  autogen-modules: Paths_taffybar

  cc-options: -fPIC
  ghc-options: -funbox-strict-fields -fno-warn-orphans

executable taffybar
  import: haskell, exe
  build-depends: data-default
               , directory
               , hslogger
               , optparse-applicative
               , taffybar

  other-modules: Paths_taffybar
  autogen-modules: Paths_taffybar

  hs-source-dirs: app
  main-is: Main.hs
  pkgconfig-depends: gtk+-3.0

common test
  default-extensions:
    ImportQualifiedPost
    NamedFieldPuns
    RecordWildCards
    OverloadedStrings
    ScopedTypeVariables
  ghc-options: -fno-warn-orphans

library testlib
  import: haskell, test
  hs-source-dirs: test/lib
  exposed-modules: TestLibSpec
                 , System.Taffybar.Test.DBusSpec
                 , System.Taffybar.Test.UtilSpec
                 , System.Taffybar.Test.XvfbSpec
  build-depends: attoparsec
               , bytestring
               , containers
               , data-default
               , dbus
               , extra
               , filepath
               , hslogger
               , hspec
               , taffybar
               , text
               , typed-process
               , unix
               , unliftio
               , unliftio-core
               , QuickCheck >= 2
  build-tool-depends: hspec-discover:hspec-discover == 2.*

test-suite unit
  import: haskell, test, exe
  type: exitcode-stdio-1.0
  hs-source-dirs: test/unit
  main-is: unit-tests.hs
  other-modules: UnitSpec
               , System.Taffybar.AuthSpec
               , System.Taffybar.ContextSpec
               , System.Taffybar.Information.X11DesktopInfoSpec
               , System.Taffybar.SimpleConfigSpec
  build-depends: data-default
               , filepath
               , gi-gtk
               , hspec
               , hspec-core
               , hspec-golden
               , taffybar
               , taffybar:testlib
               , transformers
               , QuickCheck
  build-tool-depends: hspec-discover:hspec-discover == 2.*

source-repository head
  type: git
  location: git://github.com/taffybar/taffybar.git