packages feed

etc-0.3.2.0: etc.cabal

name: etc
version: 0.3.2.0
cabal-version: >=1.10
build-type: Simple
license: MIT
license-file: LICENSE
copyright: 2017, 2018 Roman Gonzalez
maintainer: open-source@roman-gonzalez.info
homepage: https://github.com/roman/Haskell-etc
synopsis: Declarative configuration spec for Haskell projects
description:
    `etc` gathers configuration values from multiple sources (cli options, OS
    environment variables, files) using a declarative spec file that defines where
    these values are to be found and located in a configuration map.
category: Configuration, System
author: Roman Gonzalez
tested-with: GHC ==8.0.1 GHC ==8.0.2 GHC ==8.2.2 GHC ==8.4.2
data-files:
    test/fixtures/config.foo
    test/fixtures/config.json
    test/fixtures/config.env.json
    test/fixtures/config.null.json
    test/fixtures/config.spec.yaml
    test/fixtures/config.yaml
    test/fixtures/config.yml
extra-source-files:
    README.md
    CHANGELOG.md

source-repository head
    type: git
    location: https://github.com/roman/Haskell-etc

flag extra
    description:
        Include extra utilities
    default: False

flag cli
    description:
        Include support for cli arguments
    default: False

flag yaml
    description:
        Include support to parse YAML files
    default: False

library
    
    if flag(extra)
        exposed-modules:
            System.Etc.Internal.Extra.Printer
            System.Etc.Internal.Extra.EnvMisspell
        build-depends:
            ansi-wl-pprint >=0.6,
            edit-distance >=0.2
        cpp-options: -DWITH_EXTRA
    
    if flag(cli)
        exposed-modules:
            System.Etc.Internal.Resolver.Cli
            System.Etc.Internal.Resolver.Cli.Common
            System.Etc.Internal.Resolver.Cli.Plain
            System.Etc.Internal.Resolver.Cli.Command
        build-depends:
            optparse-applicative >=0.12
        cpp-options: -DWITH_CLI
    
    if flag(yaml)
        exposed-modules:
            System.Etc.Internal.Spec.YAML
        build-depends:
            yaml >=0.8
        cpp-options: -DWITH_YAML
    exposed-modules:
        System.Etc
        System.Etc.Spec
        System.Etc.Internal.Config
        System.Etc.Internal.Spec.JSON
        System.Etc.Internal.Spec.Types
        System.Etc.Internal.Types
        System.Etc.Internal.Resolver.Default
        System.Etc.Internal.Resolver.File
        System.Etc.Internal.Resolver.Env
    build-depends:
        base >=4.7 && <5,
        aeson >=0.11,
        hashable >=1.2,
        rio >=0.0.1.0,
        text >=0.0.1.0,
        typed-process >=0.1.1,
        unliftio >=0.1.1.0
    default-language: Haskell2010
    hs-source-dirs: src
    other-modules:
        Paths_etc
    ghc-options: -Wall

test-suite  etc-testsuite
    
    if flag(cli)
        build-depends:
            optparse-applicative >=0.12
        cpp-options: -DWITH_CLI
        other-modules:
            System.Etc.Resolver.CliTest
            System.Etc.Resolver.Cli.PlainTest
            System.Etc.Resolver.Cli.CommandTest
    
    if flag(yaml)
        build-depends:
            yaml >=0.8
        cpp-options: -DWITH_YAML
    
    if flag(extra)
        build-depends:
            edit-distance >=0.2
        cpp-options: -DWITH_EXTRA
        other-modules:
            System.Etc.Extra.EnvMisspellTest
    type: exitcode-stdio-1.0
    main-is: TestSuite.hs
    build-depends:
        base >=4.7,
        aeson >=0.11,
        rio >=0.0.1.0,
        tasty >=0.11,
        tasty-hunit >=0.9,
        etc -any
    default-language: Haskell2010
    hs-source-dirs: test
    other-modules:
        Paths_etc
        System.Etc.Resolver.DefaultTest
        System.Etc.Resolver.EnvTest
        System.Etc.Resolver.FileTest
        System.Etc.SpecTest
        System.Etc.ConfigTest
    ghc-options: -Wall