Source

NXT / NXT.cabal

name:                NXT
version:             0.1.9
synopsis:            A Haskell interface to Lego Mindstorms NXT
description:         A Haskell interface to Lego Mindstorms NXT over Bluetoooth. It supports direct commands, messages and
                     many sensors (also unofficial). It has also support for a simple message-based control of a NXT brick
                     via remotely executed program (basic NXC code included).
                     
                     It contains two simple programs: @nxt-upload@ for uploading files to a NXT brick and @nxt-shutdown@ for
                     remote shutdown of a NXT brick.
                     
                     It works best on Linux and it also works on Mac OS X.
                     
                     Feel free to contribute additional features, interfaces for more sensors and propose or write other
                     (example) programs.
license:             LGPL-3
license-file:        LICENSE
author:              Mitar Milutinovic
maintainer:          mitar.haskell@tnode.com
copyright:           (c) 2010 Mitar Milutinovic
category:            Robotics
build-type:          Simple
cabal-version:       >= 1.8
stability:           experimental
homepage:            http://mitar.tnode.com
extra-source-files:  remote/remote.rxe,
                     remote/remote.nxc,
                     ffi/blue.h,
                     ffi/initserial.h

library
  exposed-modules:     Robotics.NXT,
                       Robotics.NXT.MotorControl,
                       Robotics.NXT.Remote,
                       Robotics.NXT.Sensor.Compass,
                       Robotics.NXT.Sensor.Ultrasonic
  build-depends:       base >= 4.3 && < 5,
                       mtl >= 1.1 && < 3,
                       bytestring >= 0.9 && < 1,
                       time >= 1.1 && < 2,
                       serialport,
                       transformers
  other-modules:       Robotics.NXT.Data,
                       Robotics.NXT.Errors,
                       Robotics.NXT.Protocol,
                       Robotics.NXT.Types,
                       Robotics.NXT.Internals,
                       Robotics.NXT.Externals,
                       Robotics.NXT.BluetoothUtils
  hs-source-dirs:      lib
  ghc-options:         -Wall
  ghc-prof-options:    -Wall
  ghc-shared-options:  -Wall

  if os(linux)
    build-depends:  unix >= 2.4 && < 3

  if os(linux)
    c-sources:        ffi/blue.c,
                         ffi/initserial.c
    includes:         ffi/blue.h,
                         ffi/initserial.h
    extra-libraries:  bluetooth

source-repository head
  type:      mercurial
  location:  https://bitbucket.org/mitar/nxt

executable nxt-shutdown
  main-is:         Shutdown.hs
  hs-source-dirs:  src
  build-depends:   
                       base >= 4.3 && < 5,
                       mtl >= 1.1 && < 3,
                       NXT,
                       transformers,
                       serialport
  ghc-options:     -Wall

executable nxt-upload
  main-is:         UploadFiles.hs
  hs-source-dirs:  src
  build-depends:   
                       base >= 4.3 && < 5,
                       mtl >= 1.1 && < 3,
                       bytestring >= 0.9 && < 1,
                       filepath >= 1.1 && < 2,
                       NXT,
                       transformers,
                       serialport
  ghc-options:     -Wall

test-suite NXTTests
  type:            exitcode-stdio-1.0
  x-uses-tf:       true
  build-depends:   
                   base >= 4,
                   HUnit >= 1.2 && < 2,
                   QuickCheck >= 2.4,
                   test-framework >= 0.4.1,
                   test-framework-quickcheck2,
                   test-framework-hunit,
                   NXT,
                   transformers,
                   serialport,
                   mtl
  ghc-options:     -Wall -rtsopts
  hs-source-dirs:  test
  main-is:         Main.hs
  other-modules:   Robotics.NXT.Basic