packages feed

ed25519-0.0.1.0: ed25519.cabal

name:                ed25519
version:             0.0.1.0
category:            Cryptography
license:             MIT
synopsis:            ed25519 cryptographic signatures
homepage:            http://thoughtpolice.github.com/hs-ed25519
bug-reports:         http://github.com/thoughtpolice/hs-ed25519/issues
license-file:        LICENSE.txt
copyright:           Copyright (c) Austin Seipp 2013
author:              Austin Seipp
maintainer:          Austin Seipp <aseipp@pobox.com>
build-type:          Custom
cabal-version:       >=1.10
tested-with:         GHC == 7.4.1, GHC == 7.4.2,
                     GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3

description:
  This package provides a simple, portable implementation of the
  ed25519 public-key signature system. It also includes support for
  detached signatures.
  .
  The underlying implementation uses the @ref10@ implementation of
  ed25519 from SUPERCOP, and should be relatively fast.
  .
  For more information (including how to get a copy of the software)
  visit <http://ed25519.cr.yp.to>.

extra-source-files:
  .travis.yml
  AUTHORS.txt
  README.md
  CONTRIBUTING.md
  CHANGELOG.md
  src/cbits/*.c
  src/cbits/include/*.h

source-repository head
  type: git
  location: https://github.com/thoughtpolice/hs-ed25519.git

-------------------------------------------------------------------------------
-- Flags

flag test-properties
  default: True
  manual: True

-- Enable these when/if we need them.
flag test-hunit
  default: False
  manual: True

-- Can't run due to needing C library apparently?
flag test-doctests
  default: False
  manual: True

flag test-hlint
  default: True
  manual: True

flag threaded
  default: True
  manual: True

flag llvm
  default: False
  manual: True

flag optimized
  default: True
  manual: True

-------------------------------------------------------------------------------
-- Build pt 1: main project

library
  build-depends:
    base >= 4 && < 5,
    bytestring

  exposed-modules:
    Crypto.Sign.Ed25519

  if flag(optimized)
    ghc-options: -O2

  if flag(llvm)
    ghc-options: -fllvm

  ghc-options:        -Wall -fwarn-tabs
  default-language:   Haskell2010
  hs-source-dirs:     src
  cc-options:         -O3 -march=native
  c-sources:          src/cbits/ed25519.c
  include-dirs:       src/cbits src/cbits/include

-------------------------------------------------------------------------------
-- Build pt 2: Tests

test-suite properties
  type: exitcode-stdio-1.0
  main-is: properties.hs
  ghc-options: -w
  hs-source-dirs: tests
  default-language:   Haskell2010

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  if !flag(test-properties)
    buildable: False
  else
    build-depends:
      base,
      ed25519,
      bytestring,
      deepseq,
      QuickCheck       >= 2.4,
      tasty            >= 0.3,
      tasty-quickcheck >= 0.3,
      tasty-th         >= 0.1.1

test-suite hunit
  type: exitcode-stdio-1.0
  main-is: hunit.hs
  ghc-options: -w
  hs-source-dirs: tests
  default-language:   Haskell2010

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  if !flag(test-hunit)
    buildable: False
  else
    build-depends:
      base,
      ed25519,
      bytestring,
      deepseq,
      QuickCheck       >= 2.4,
      tasty            >= 0.3,
      tasty-hunit      >= 0.2,
      tasty-th         >= 0.1.1

--
-- Style/doc tests below
--

test-suite hlint
  type: exitcode-stdio-1.0
  main-is: hlint.hs
  ghc-options: -w
  hs-source-dirs: tests
  default-language:   Haskell2010

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  if !flag(test-hlint)
    buildable: False
  else
    build-depends:
      base,
      hlint >= 1.7

test-suite doctests
  type:           exitcode-stdio-1.0
  main-is:        doctests.hs
  ghc-options:    -Wall
  hs-source-dirs: tests
  default-language:   Haskell2010

  if flag(threaded)
    ghc-options: -threaded -rtsopts -with-rtsopts=-N

  if flag(llvm)
    ghc-options: -fllvm

  if !flag(test-doctests)
    buildable: False
  else
    build-depends:
      base,
      bytestring,
      containers,
      directory      >= 1.0,
      deepseq,
      doctest        >= 0.9.1,
      filepath,
      semigroups     >= 0.9

  if impl(ghc<7.6.1)
    ghc-options: -Werror

-------------------------------------------------------------------------------
-- Build pt 3: benchmarks

benchmark bench1
  type:               exitcode-stdio-1.0
  build-depends:
    base >= 4 && < 5,
    bytestring,
    criterion,
    deepseq,
    ed25519

  if flag(optimized)
    ghc-options: -O2

  if flag(llvm)
    ghc-options: -fllvm

  default-language:   Haskell2010
  hs-source-dirs:     benchmarks
  main-is:            bench1.hs