packages feed

cacophony-0.11.0: package.yaml

name: cacophony
synopsis: A library implementing the Noise protocol.
version: 0.11.0
license: PublicDomain
license-file: LICENSE
maintainer: John Galt <jgalt@centromere.net>
category: Cryptography
github: centromere/cacophony
ghc-options: -Wall
description: |
  This library implements the <https://noiseprotocol.org Noise> protocol.
extra-source-files:
  - .travis.yml
  - README.md
  - changelog.md
  - LICENSE
  - stack.yaml
  - package.yaml
  - tools/pretty-print/format-vectors.py
  - tools/pretty-print/vector-template.jinja
  - vectors/cacophony.txt

flags:
  build-tools:
    description: Build tools
    default: False
    manual: True

dependencies:
  - base >= 4.9 && < 5

library:
  source-dirs: src
  dependencies:
    - bytestring
    - crypton
    - exceptions
    - free
    - lens
    - memory
    - monad-coroutine
    - mtl
    - safe-exceptions
    - transformers

  exposed-modules:
    - Crypto.Noise
    - Crypto.Noise.Cipher
    - Crypto.Noise.Cipher.AESGCM
    - Crypto.Noise.Cipher.ChaChaPoly1305
    - Crypto.Noise.DH
    - Crypto.Noise.DH.Curve25519
    - Crypto.Noise.DH.Curve448
    - Crypto.Noise.Exception
    - Crypto.Noise.HandshakePatterns
    - Crypto.Noise.Hash
    - Crypto.Noise.Hash.BLAKE2b
    - Crypto.Noise.Hash.BLAKE2s
    - Crypto.Noise.Hash.SHA256
    - Crypto.Noise.Hash.SHA512
    - Crypto.Noise.Internal.CipherState
    - Crypto.Noise.Internal.Handshake.Interpreter
    - Crypto.Noise.Internal.Handshake.Pattern
    - Crypto.Noise.Internal.Handshake.State
    - Crypto.Noise.Internal.Handshake.Validation
    - Crypto.Noise.Internal.NoiseState
    - Crypto.Noise.Internal.SymmetricState
    - Crypto.Noise.Validation

  default-extensions:
    - OverloadedStrings

tests:
  hlint:
    main: hlint.hs
    source-dirs: tests/hlint
    dependencies:
      - hlint

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

  vectors:
    main: Main.hs
    source-dirs: tests/vectors
    dependencies:
      - aeson
      - attoparsec
      - base16-bytestring
      - bytestring
      - cacophony
      - directory
      - text

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

    default-extensions:
      - OverloadedStrings

benchmarks:
  bench:
    main: Main.hs
    source-dirs: benchmarks
    dependencies:
      - async
      - base16-bytestring
      - bytestring
      - cacophony
      - criterion
      - deepseq

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

    default-extensions:
      - OverloadedStrings

executables:
  noise-repl:
    source-dirs: tools/noise-repl
    main: Main.hs
    when:
      - condition: 'flag(build-tools)'
        then:
          dependencies:
            - attoparsec
            - base16-bytestring
            - base64-bytestring
            - bytestring
            - cacophony
            - haskeline
            - network
            - process
        else:
          buildable: False

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

    default-extensions:
      - OverloadedStrings