aboutsummaryrefslogtreecommitdiff
cabal-version:      1.20
name:               openweathermap
version:            0.3.0
license:            PublicDomain
license-file:       LICENSE
maintainer:         Igor Pashev <pashev.igor@gmail.com>
author:             Igor Pashev
synopsis:           Access data at OpenWeatherMap
description:
    Client library and command-line utility to access
    OpenWeatherMap https://openweathermap.org

category:           Web
build-type:         Simple
extra-source-files:
    README.md
    ChangeLog.md

source-repository head
    type:     git
    location: http://git.pashev.ru/openweathermap

flag cmd
    description: Build a command-line utility.

library
    exposed-modules:
        Web.OpenWeatherMap.API
        Web.OpenWeatherMap.Client
        Web.OpenWeatherMap.Formulas
        Web.OpenWeatherMap.Types.City
        Web.OpenWeatherMap.Types.Clouds
        Web.OpenWeatherMap.Types.Coord
        Web.OpenWeatherMap.Types.CurrentWeather
        Web.OpenWeatherMap.Types.Forecast
        Web.OpenWeatherMap.Types.ForecastWeather
        Web.OpenWeatherMap.Types.Location
        Web.OpenWeatherMap.Types.Main
        Web.OpenWeatherMap.Types.Sys
        Web.OpenWeatherMap.Types.Weather
        Web.OpenWeatherMap.Types.Wind

    hs-source-dirs:   lib
    default-language: Haskell2010
    ghc-options:      -Wall
    build-depends:
        base >=4.9 && <5,
        aeson -any,
        bytestring -any,
        http-api-data -any,
        http-client-tls -any,
        servant -any,
        servant-client >=0.19,
        servant-client-core -any,
        text -any

executable openweathermap
    main-is:          Main.hs
    hs-source-dirs:   cmd
    other-modules:    Print
    default-language: Haskell2010
    ghc-options:      -Wall -static

    if flag(cmd)
        build-depends:
            base >=4.9 && <5,
            directory -any,
            openweathermap -any,
            optparse-applicative >=0.13.0.0,
            time -any,
            xdg-basedir -any

    else
        buildable: False