Skip to content
Snippets Groups Projects
gbs-downloader.cabal 8.4 KiB
Newer Older
cabal-version:   2.4

-- The cabal-version field refers to the version of the .cabal specification,
-- and can be different from the cabal-install (the tool) version and the
-- Cabal (the library) version you are using. As such, the Cabal (the library)
-- version used must be equal or greater than the version stated in this field.
-- Starting from the specification version 2.2, the cabal-version field must be
-- the first thing in the cabal file.

-- Initial package description 'gbs-downloader' generated by
-- 'cabal init'. For further documentation, see:
--   http://haskell.org/cabal/users-guide/
--
-- The name of the package.
name:            gbs-downloader

-- The package version.
-- See the Haskell package versioning policy (PVP) for standards
-- guiding when and how versions should be incremented.
-- https://pvp.haskell.org
-- PVP summary:     +-+------- breaking API changes
--                  | | +----- non-breaking API additions
--                  | | | +--- code changes with no API change
version:         0.1.0.0

-- A short (one-line) description of the package.
synopsis:
  A library for downloading data from a Great Black Swamp server

-- A longer description of the package.
description:
  Integrate tahoe-ssk, tahoe-chk, and tahoe-directory to provide a high-level
  API for downloading immutable and mutable files and directories.

-- URL for the project homepage or repository.
homepage:
  https://whetstone.private.storage/PrivateStorage/gbs-downloader

-- The license under which the package is released.
license:         BSD-3-Clause

-- The file containing the license text.
license-file:    LICENSE

-- The package author(s).
author:          Jean-Paul Calderone and others

-- An email address to which users can send suggestions, bug reports, and patches.
maintainer:      exarkun@twistedmatrix.com

-- A copyright notice.
copyright:       2023 The Authors
category:        Network
build-type:      Simple

-- Extra doc files to be distributed with the package, such as a CHANGELOG or a README.
extra-doc-files:
  CHANGELOG.md
  README.md

-- Extra source files to be distributed with the package, such as examples, or a tutorial module.
-- extra-source-files:

source-repository head
  type:     git
  location:
    https://whetstone.private.storage/PrivateStorage/gbs-downloader.git

common warnings
  ghc-options: -Wall
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed

common language
  -- LANGUAGE extensions used by modules in all targets.
  default-extensions:
    DerivingStrategies
    GeneralizedNewtypeDeriving
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
    NamedFieldPuns
    OverloadedStrings
    RecordWildCards
    ScopedTypeVariables

library
  -- Import common warning flags.
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
  import:
    warnings
    , language

  -- Modules exported by the library.
  exposed-modules:
    Tahoe.Announcement
    Tahoe.Download
    Tahoe.Download.Internal.Client
    Tahoe.Download.Internal.Immutable
    Tahoe.Download.Internal.Mutable

  -- Modules included in this library but not exported.
  -- other-modules:

  -- LANGUAGE extensions used by modules in this package.
  -- other-extensions:

  -- Other library packages from which modules are imported.
    , aeson                    >=1.4.7    && <2.2
    , async                    >=2.2.2    && <2.3
    , base                     >=4.7      && <5
    , base32                   >=0.2.1    && <0.3
    , base64-bytestring        >=1.0.0.3  && <1.3
    , binary                   >=0.8.6    && <0.9
    , bytestring               >=0.10.8.2 && <0.11
    , connection               >=0.3.1    && <0.4
    , containers               >=0.6.0.1  && <0.7
    , data-default-class       >=0.1.2    && <0.2
    , exceptions               >=0.10.4   && <0.11
    , http-client              >=0.6.4.1  && <0.8
    , http-client-tls          >=0.3.5.3  && <0.4
    , http-types               >=0.12.3   && <0.13
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
    , mtl                      >=2.2.2    && <2.4
    , network-uri              >=2.6.3    && <2.7
    , servant-client           >=0.16.0.1 && <0.21
    , servant-client-core      >=0.16     && <0.21
    , tahoe-directory          >=0.1      && <0.2
    , tahoe-great-black-swamp  >=0.3.1    && <0.4
    , text                     >=1.2.3.1  && <1.3
    , yaml                     >=0.11.5.0 && <0.11.9.0 || >=0.11.9.0.0 && <0.12

  -- Directories containing source files.
  hs-source-dirs:   src

  -- Base language which the package is written in.
  default-language: Haskell2010
executable download-chk
  -- Import common warning flags.
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
  import:
    warnings
    , language

  -- .hs or .lhs file containing the Main module.
  main-is:          Main.hs

  -- Modules included in this executable, other than Main.
  -- other-modules:

  -- LANGUAGE extensions used by modules in this package.
  -- other-extensions:

  -- Other library packages from which modules are imported.
  build-depends:
    , aeson           >=1.4.7    && <2.2
    , base            >=4.7      && <5
    , bytestring      >=0.10.8.2 && <0.11
    , containers      >=0.6.0.1  && <0.7
    , gbs-downloader
    , megaparsec      >=8.0      && <9.3
    , text            >=1.2.3.1  && <1.3
    , yaml            >=0.11.5.0 && <0.11.9.0 || >=0.11.9.0.0 && <0.12

  -- Directories containing source files.
  hs-source-dirs:   app

  -- Base language which the package is written in.
  default-language: Haskell2010

executable download-sdmf
  import:
    warnings
    , language

  main-is:          Main.hs
  build-depends:
    , aeson           >=1.4.7    && <2.2
    , base            >=4.7      && <5
    , bytestring      >=0.10.8.2 && <0.11
    , containers      >=0.6.0.1  && <0.7
    , gbs-downloader
    , megaparsec      >=8.0      && <9.3
    , text            >=1.2.3.1  && <1.3
    , yaml            >=0.11.5.0 && <0.11.9.0 || >=0.11.9.0.0 && <0.12

  hs-source-dirs:   download-sdmf
  default-language: Haskell2010

executable list-dircap
  import:
    warnings
    , language

  main-is:          Main.hs
  build-depends:
    , aeson            >=1.4.7    && <2.2
    , base             >=4.7      && <5
    , bytestring       >=0.10.8.2 && <0.11
    , containers       >=0.6.0.1  && <0.7
    , gbs-downloader
    , megaparsec       >=8.0      && <9.3
    , tahoe-directory  >=0.1      && <0.2
    , text             >=1.2.3.1  && <1.3
    , yaml             >=0.11.5.0 && <0.11.9.0 || >=0.11.9.0.0 && <0.12

  hs-source-dirs:   list-dircap
  default-language: Haskell2010

test-suite gbs-downloader-test
  -- Import common warning flags.
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
  import:
    warnings
    , language

  -- Base language which the package is written in.
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
  default-language: Haskell2010
  ghc-options:      -threaded

  -- Modules included in this executable, other than Main.

  -- The interface type and version of the test suite.
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
  type:             exitcode-stdio-1.0

  -- Directories containing source files.
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
  hs-source-dirs:   test

  -- The entrypoint to the test suite.
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
  main-is:          Spec.hs

  -- Test dependencies.
  build-depends:
    , asn1-encoding        >=0.9.6    && <0.10
    , asn1-types           >=0.3.4    && <0.4
    , base                 >=4.7      && <5
    , base32               >=0.2.1    && <0.3
    , binary               >=0.8.6    && <0.9
    , bytestring           >=0.10.8.2 && <0.11
    , containers           >=0.6.0.1  && <0.7
    , crypto-api           >=0.13.3   && <0.14
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
    , cryptonite           >=0.27     && <0.31
    , data-default-class   >=0.1.2    && <0.2
    , gbs-downloader
    , hedgehog             >=1.0.3    && <1.1
    , http-client          >=0.6.4.1  && <0.8
    , http-types           >=0.12.3   && <0.13
    , memory               >=0.15     && <0.17
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
    , mtl                  >=2.2.2    && <2.4
    , servant-client       >=0.16.0.1 && <0.21
    , servant-client-core  >=0.16     && <0.21
    , tahoe-chk            >=0.2      && <0.3
    , tahoe-ssk            >=0.3      && <0.4
    , tasty                >=1.2.3    && <1.5
    , tasty-hedgehog       >=1.0.0.2  && <1.2
    , tasty-hunit          >=0.10.0.2 && <0.11
    , text                 >=1.2.3.1  && <1.3
    , x509                 >=1.7.5    && <1.8
    , yaml                 >=0.11.5.0 && <0.11.9.0 || >=0.11.9.0.0 && <0.12