kafka-device-joystick 0.2.1.2 → 1.0.0.0
raw patch · 6 files changed
+81/−56 lines, 6 filesdep ~aesondep ~basedep ~binaryPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, base, binary, bytestring, cereal, kafka-device, yaml
API changes (from Hackage documentation)
Files
- default.nix +20/−0
- kafka-device-joystick.cabal +42/−38
- src/Main.hs +3/−3
- src/Network/UI/Kafka/Joystick.hs +3/−3
- src/Network/UI/Kafka/Joystick/Interpretation.hs +5/−4
- src/System/Hardware/Linux/Joystick.hs +8/−8
+ default.nix view
@@ -0,0 +1,20 @@+{+ mkDerivation, stdenv+, aeson, base, binary, bytestring, cereal, kafka-device, yaml+}:++mkDerivation {+ pname = "kafka-device-joystick";+ version = "1.0.0.0";+ src = ./.;+ isLibrary = true;+ isExecutable = true;+ libraryHaskellDepends = [+ aeson base binary bytestring cereal kafka-device yaml+ ];+ executableHaskellDepends = [+ ];+ homepage = "https://bitbucket.org/functionally/kafka-device-joystick";+ description = "Linux joystick events via a Kafka message broker";+ license = stdenv.lib.licenses.mit;+}
kafka-device-joystick.cabal view
@@ -1,50 +1,54 @@-name: kafka-device-joystick-version: 0.2.1.2-synopsis: Linux joystick events via a Kafka message broker-description: This package contains functions for passing Linux joystick events to topics on a Kafka message broker \<<https://kafka.apache.org/>\>. The joystick's driver must conform to the Linux Joystick API \<<https://www.kernel.org/doc/Documentation/input/joystick-api.txt>\>. Also see \<<https://hackage.haskell.org/package/kafka-device/>\>.-license: MIT-license-file: LICENSE-author: Brian W Bush <consult@brianwbush.info>-maintainer: Brian W Bush <consult@brianwbush.info>-copyright: (c) 2016-17 Brian W Bush-category: Hardware-build-type: Simple-cabal-version: >= 1.10-stability: Experimental-homepage: https://bitbucket.org/functionally/kafka-device-joystick-bug-reports: https://bwbush.atlassian.net/projects/HKAFDEV/issues/-package-url: https://bitbucket.org/functionally/kafka-device-joystick/downloads/kafka-device-joystick-$version.tar.gz+name : kafka-device-joystick+version : 1.0.0.0+synopsis : Linux joystick events via a Kafka message broker+description : This package contains functions for passing Linux joystick events to topics on a Kafka message broker \<<https://kafka.apache.org/>\>. The joystick's driver must conform to the Linux Joystick API \<<https://www.kernel.org/doc/Documentation/input/joystick-api.txt>\>. Also see \<<https://hackage.haskell.org/package/kafka-device/>\>.+license : MIT+license-file : LICENSE+author : Brian W Bush <code@functionally.io>+maintainer : Brian W Bush <code@functionally.io>+copyright : (c) 2016-19 Brian W Bush+category : Hardware+build-type : Simple+cabal-version: >= 1.10+stability : Production+homepage : https://bitbucket.org/functionally/kafka-device-joystick+bug-reports : https://bwbush.atlassian.net/projects/HKAFDEV/issues/+package-url : https://bitbucket.org/functionally/kafka-device-joystick/downloads/kafka-device-joystick-$version.tar.gz -extra-source-files: ReadMe.md- sample.yaml+extra-source-files: ReadMe.md+ default.nix+ sample.yaml source-repository head- type: git+ type : git location: https://bitbucket.org/functionally/kafka-device-joystick library- exposed-modules: Network.UI.Kafka.Joystick+ exposed-modules : Network.UI.Kafka.Joystick Network.UI.Kafka.Joystick.Interpretation System.Hardware.Linux.Joystick- build-depends: base >= 4.8 && < 5- , aeson >= 0.11.3- , binary >= 0.7.2- , bytestring >= 0.10.6- , cereal >= 0.5.4- , kafka-device >= 0.2.1.2- hs-source-dirs: src- ghc-options: -Wall+ build-depends : base >= 4.8 && < 5+ , aeson >= 1.3.1+ , binary >= 0.8.5+ , bytestring >= 0.10.8+ , cereal >= 0.5.7+ , kafka-device >= 1.0.0+ hs-source-dirs : src+ ghc-options : -Wall default-language: Haskell2010 executable kafka-device-joystick- main-is: Main.hs- build-depends: base- , aeson- , binary- , bytestring- , cereal- , kafka-device- , yaml >= 0.8.22- hs-source-dirs: src- ghc-options: -Wall -threaded+ main-is : Main.hs+ other-modules : Network.UI.Kafka.Joystick+ Network.UI.Kafka.Joystick.Interpretation+ System.Hardware.Linux.Joystick+ build-depends : base >= 4.8 && < 5+ , aeson >= 1.3.1+ , binary >= 0.8.5+ , bytestring >= 0.10.8+ , cereal >= 0.5.7+ , kafka-device >= 1.0.0+ , yaml >= 0.8.32+ hs-source-dirs : src+ ghc-options : -Wall -threaded default-language: Haskell2010
src/Main.hs view
@@ -1,9 +1,9 @@ {-| Module : $Header$-Copyright : (c) 2016-17 Brian W Bush+Copyright : (c) 2016-19 Brian W Bush License : MIT-Maintainer : Brian W Bush <consult@brianwbush.info>-Stability : Experimental+Maintainer : Brian W Bush <code@functionally.io>+Stability : Production Portability : Linux Produce events for a Kafka topic from a Linux joystick.
src/Network/UI/Kafka/Joystick.hs view
@@ -1,9 +1,9 @@ {-| Module : $Header$-Copyright : (c) 2016-17 Brian W Bush+Copyright : (c) 2016-19 Brian W Bush License : MIT-Maintainer : Brian W Bush <consult@brianwbush.info>-Stability : Experimental+Maintainer : Brian W Bush <code@functionally.io>+Stability : Production Portability : Linux Produce events for a Kafka topic from a Linux joystick, which must conform to the Linux Joystick API \<<https://www.kernel.org/doc/Documentation/input/joystick-api.txt>\>.
src/Network/UI/Kafka/Joystick/Interpretation.hs view
@@ -1,9 +1,9 @@ {-| Module : $Header$-Copyright : (c) 2016-17 Brian W Bush+Copyright : (c) 2016-19 Brian W Bush License : MIT-Maintainer : Brian W Bush <consult@brianwbush.info>-Stability : Experimental+Maintainer : Brian W Bush <code@functionally.io>+Stability : Production Portability : Linux Produce interpreted events for a Kafka topic from a Linux joystick, which must conform to the Linux Joystick API \<<https://www.kernel.org/doc/Documentation/input/joystick-api.txt>\>.@@ -39,7 +39,8 @@ joystick <- openFile device ReadMode (exit, loop) <- interpretationLoop analogHandler buttonHandler interpretation- $ interpretJoystick <$> hGet joystick byteLength+ $ interpretJoystick+ <$> hGet joystick byteLength return ( do
src/System/Hardware/Linux/Joystick.hs view
@@ -1,9 +1,9 @@ {-| Module : $Header$-Copyright : (c) 2016-17 Brian W Bush+Copyright : (c) 2016-19 Brian W Bush License : MIT-Maintainer : Brian W Bush <consult@brianwbush.info>-Stability : Experimental+Maintainer : Brian W Bush <code@functionally.io>+Stability : Production Portability : Linux Interpret events from a Linux joystick, which must conform to the Linux Joystick API \<<https://www.kernel.org/doc/Documentation/input/joystick-api.txt>\>.@@ -60,9 +60,9 @@ data RawJoystick = RawJoystick {- rawTime :: Word32- , rawValue :: Word16- , rawType :: Word8+ rawTime :: Word32+ , rawValue :: Word16+ , rawType :: Word8 , rawNumber :: Word8 } deriving (Eq, Ord, Read, Show)@@ -115,8 +115,8 @@ value = twosComplement rawValue number = fromIntegral rawNumber typ = fromIntegral rawType :: Int- button = 0x01 .&. typ /= 0- axis = 0x02 .&. typ /= 0+ button = 0x01 .&. typ /= 0+ axis = 0x02 .&. typ /= 0 initial = 0x80 .&. typ /= 0 in Joystick{..}