packages feed

roon-api-0.1.0.0: roon-api.cabal

cabal-version:   3.12
name:            roon-api
version:         0.1.0.0
synopsis:        Client library for the Roon extension API
description:
  An independent, unofficial Haskell implementation of the protocol that
  Roon extensions use to talk to a Roon Server: MOO messages over a
  WebSocket, discovery of the servers on the network, the registration of
  an extension, the transport service (zones, queue, playback, volume),
  the browse service (search, library, play actions) and images. Built on
  Effectful and Streamly. Not affiliated with Roon Labs.

homepage:        https://github.com/GuillaumedeVolpiano/roon-api
license:         BSD-3-Clause
license-file:    LICENSE
author:          Xavier Dectot
maintainer:      Xavier Dectot <xavier@wheredoibegin.fr>
category:        Sound, Network
build-type:      Simple
tested-with:     GHC ==9.8.4 || ==9.10.3 || ==9.12.4
extra-doc-files:
  CHANGELOG.md
  README.md

source-repository head
  type:     git
  location: https://github.com/GuillaumedeVolpiano/roon-api.git

common shared
  default-language: GHC2021
  default-extensions:
    DataKinds
    DerivingStrategies
    DisambiguateRecordFields
    DuplicateRecordFields
    ExplicitNamespaces
    GADTs
    LambdaCase
    MonoLocalBinds
    NoFieldSelectors
    OverloadedRecordDot
    OverloadedStrings
    RoleAnnotations
    TypeFamilies

  ghc-options:
    -Wall -Wcompat -Wredundant-constraints -Wmissing-deriving-strategies
    -Wunused-packages

library
  import:          shared
  hs-source-dirs:  src
  exposed-modules:
    Roon.Browse
    Roon.Connection
    Roon.Discovery
    Roon.Effect.Moo
    Roon.Effect.TokenStore
    Roon.Effect.WebSocket
    Roon.Error
    Roon.Image
    Roon.Moo.Message
    Roon.Registry
    Roon.Service
    Roon.Transport

  build-depends:
    , aeson                ^>=2.3
    , base                 >=4.19 && <4.22
    , bytestring           ^>=0.12
    , containers           >=0.6.7 && <0.8
    , effectful            ^>=2.7
    , effectful-core       ^>=2.7.1
    , effectful-streamly   ^>=0.1
    , effectful-streamly-http ^>=0.1
    , effectful-websockets ^>=0.1
    , filepath             >=1.4.200 && <1.6
    , flatparse            ^>=0.5
    , network              ^>=3.2
    , streamly-bytestring  ^>=0.2.3
    , streamly-core        ^>=0.3.3
    , streamly-network-udp ^>=0.1
    , text                 ^>=2.1

executable roon-probe
  import:         shared
  hs-source-dirs: app
  main-is:        Main.hs
  other-modules:  Paths_roon_api
  autogen-modules: Paths_roon_api
  ghc-options:    -threaded
  build-depends:
    , base
    , bytestring
    , effectful
    , roon-api
    , text

test-suite roon-api-test
  import:         shared
  type:           exitcode-stdio-1.0
  hs-source-dirs: test
  main-is:        Main.hs
  other-modules:
    Roon.BrowseSpec
    Roon.ConnectionSpec
    Roon.DiscoverySpec
    Roon.Effect.TokenStoreSpec
    Roon.Effect.WebSocketSpec
    Roon.ImageSpec
    Roon.Moo.MessageSpec
    Roon.Test.Server
    Roon.TransportSpec

  ghc-options:    -threaded
  build-depends:
    , aeson
    , async             ^>=2.2
    , base
    , bytestring
    , containers
    , directory         ^>=1.3
    , effectful-streamly-http
    , effectful
    , filepath
    , network
    , roon-api
    , stm               ^>=2.5
    , streamly-core
    , temporary         ^>=1.3
    , unix              ^>=2.8
    , streamly-websockets ^>=0.1
    , text
    , tasty             ^>=1.5
    , tasty-hunit       ^>=0.10
    , tasty-quickcheck  ^>=0.11

-- Measures the parsers of the hot paths against other ways to write
-- them. Not a regression test: run it by hand, with cabal bench.
benchmark roon-api-bench
  import:         shared
  type:           exitcode-stdio-1.0
  hs-source-dirs: bench
  main-is:        Main.hs
  ghc-options:    -threaded
  build-depends:
    , aeson
    , base
    , bytestring
    , containers
    , deepseq              ^>=1.5
    , effectful
    , flatparse
    , roon-api
    , scientific           ^>=0.3
    , streamly-bytestring
    , streamly-core
    , streamly-http        ^>=0.1
    , tasty-bench          >=0.4 && <0.6
    , tasty-hunit
    , text
    , vector               ^>=0.13