-- Stackage snapshot: http://www.stackage.org/stackage/aecbf72b568a63e86a971311fee5475f076043cc
name:              stackage-server
version:           0.0.0
cabal-version:     >= 1.8
build-type:        Simple

Flag dev
    Description:   Turn on development settings, like auto-reload templates.
    Default:       False

Flag library-only
    Description:   Build for use with "yesod devel"
    Default:       False

library
    exposed-modules: Application
                     Foundation
                     Import
                     Model
                     Echo
                     Settings
                     Settings.StaticFiles
                     Settings.Development
                     Data.Slug
                     Data.Tag
                     Data.BlobStore
                     Data.Hackage
                     Data.Hackage.DeprecationInfo
                     Data.Hackage.Views
                     Data.WebsiteContent
                     Data.Unpacking
                     Types
                     Handler.Home
                     Handler.Snapshots
                     Handler.Profile
                     Handler.Email
                     Handler.ResetToken
                     Handler.UploadStackage
                     Handler.StackageHome
                     Handler.StackageIndex
                     Handler.StackageSdist
                     Handler.HackageViewIndex
                     Handler.HackageViewSdist
                     Handler.Aliases
                     Handler.Alias
                     Handler.Progress
                     Handler.System
                     Handler.Haddock
                     Handler.Hoogle
                     Handler.Package
                     Handler.PackageList
                     Handler.CompressorStatus
                     Handler.Tag
                     Handler.BannedTags
                     Handler.RefreshDeprecated
                     Handler.BuildVersion
                     Handler.PackageCounts

    if flag(dev) || flag(library-only)
        cpp-options:   -DDEVELOPMENT
        ghc-options:   -Wall -O0
    else
        ghc-options:   -Wall -O2

    extensions: TemplateHaskell
                QuasiQuotes
                OverloadedStrings
                NoImplicitPrelude
                CPP
                MultiParamTypeClasses
                TypeFamilies
                GADTs
                GeneralizedNewtypeDeriving
                FlexibleContexts
                EmptyDataDecls
                NoMonomorphismRestriction
                DeriveDataTypeable
                ViewPatterns
                TypeSynonymInstances
                FlexibleInstances
                RankNTypes
                FunctionalDependencies
                PatternGuards
                StandaloneDeriving
                UndecidableInstances
                RecordWildCards
                ScopedTypeVariables
                BangPatterns
                DeriveGeneric

    build-depends:
                    base                          >= 4
                  , aeson                         >= 0.6
                  , aws
                  , base16-bytestring
                  , blaze-markup                  >= 0.6
                  , byteable
                  , bytestring                    >= 0.9
                  , classy-prelude-yesod          >= 0.9.2
                  , conduit                       >= 1.0
                  , conduit-extra
                  , cryptohash
                  , cryptohash-conduit            >= 0.1.1
                  , data-default
                  , directory                     >= 1.1
                  , email-validate
                  , esqueleto
                  , exceptions
                  , fast-logger                   >= 2.1.4
                  , foreign-store
                  , ghc-prim
                  , hjsmin                        >= 0.1
                  , html-conduit
                  , http-conduit                  >= 2.1.2.3
                  , monad-control                 >= 0.3
                  , monad-logger                  >= 0.3.6
                  , mtl                           >= 2.1
                  , mwc-random                    >= 0.13
                  , persistent                    >= 1.3.1
                  , persistent-postgresql         >= 1.3
                  , persistent-template           >= 1.3
                  , resourcet                     >= 1.1.2
                  , shakespeare                   >= 2.0
                  , system-fileio
                  , system-filepath
                  , tar                           >= 0.4
                  , template-haskell
                  , temporary-rc                  >= 1.2
                  , text                          >= 0.11
                  , wai                           >= 2.1
                  , wai-extra                     >= 2.1
                  , wai-logger                    >= 2.1
                  , warp                          >= 2.1
                  , xml-conduit
                  , yaml                          >= 0.8
                  , yesod                         >= 1.2.5
                  , yesod-auth                    >= 1.3
                  , yesod-core                    >= 1.2.19
                  , yesod-form                    >= 1.3.14
                  , yesod-static                  >= 1.2
                  , zlib
                  , unordered-containers
                 -- Avoid https://github.com/haskell/cabal/issues/1202
                 , Cabal >= 1.18
                 , lifted-base
                 , mono-traversable
                 , time
                 , process
                 , old-locale
                 , th-lift
                 , mime-types
                 , unix
                 , markdown >= 0.1.13
                 , formatting
                 , blaze-html
                 , haddock-library
                 , yesod-gitrepo >= 0.1.1
                 , hoogle
                 , spoon
                 , deepseq
                 , deepseq-generics

executable         stackage-server
    if flag(library-only)
        Buildable: False

    main-is:           main.hs
    hs-source-dirs:    app
    build-depends:     base
                     , stackage-server
                     , yesod

    ghc-options:       -threaded -O2 -rtsopts -with-rtsopts=-N

executable         cabal-loader-stackage
    if flag(library-only)
        Buildable: False

    main-is:           cabal-loader.hs
    hs-source-dirs:    app
    build-depends:     base
                     , stackage-server
                     , yesod

    ghc-options:       -threaded -O2 -rtsopts -with-rtsopts=-N

test-suite test
    type:              exitcode-stdio-1.0
    main-is:           main.hs
    hs-source-dirs:    test
    ghc-options:       -Wall

    build-depends: base
                 , stackage-server
                 , yesod-test >= 1.2
                 , yesod-core
                 , yesod
                 , persistent
                 , persistent-postgresql
                 , resourcet
                 , monad-logger
                 , transformers
                 , hspec
                 , classy-prelude-yesod
                 , mtl
                 , mwc-random
