proto-lens-setup: Cabal support for codegen with proto-lens.

[ bsd3, library, unclassified ] [ Propose Tags ]

This package provides Cabal support for the proto-lens package. It automatically generates Haskell source files from protocol buffer files (.proto).

To generate Haskell modules for a Cabal package, import Data.ProtoLens.Setup from the Setup.hs file. For example:

import Data.ProtoLens.Setup
-- Here, "src" is the directory where .proto source files may be found
main = defaultMainGeneratingProtos "src"

Then, edit the .cabal file of your project to:

For example, in foo-bar-proto.cabal:

build-type: Custom
extra-source-files: src/foo/bar.proto
...
custom-setup
  setup-depends: base, Cabal, proto-lens-setup
library
    exposed-modules: Proto.Foo.Bar, Proto.Foo.Bar_Fields
    autogen-modules: Proto.Foo.Bar, Proto.Foo.Bar_Fields
    build-depends: proto-lens-runtime, ...
Versions [faq] 0.4.0.0, 0.4.0.1, 0.4.0.2
Change log Changelog.md
Dependencies base (>=4.9 && <4.13), bytestring (==0.10.*), Cabal (>=1.22 && <2.5), containers (>=0.5 && <0.7), deepseq (==1.4.*), directory (>=1.2 && <1.4), filepath (>=1.4 && <1.6), process (>=1.2 && <1.7), proto-lens-protoc (>=0.4 && <0.6), temporary (>=1.2 && <1.4), text (==1.2.*) [details]
License BSD-3-Clause
Copyright Google Inc.
Author Judah Jacobson
Maintainer proto-lens@googlegroups.com
Home page https://github.com/google/proto-lens#readme
Bug tracker https://github.com/google/proto-lens/issues
Source repo head: git clone https://github.com/google/proto-lens(proto-lens-setup)
Uploaded by JudahJacobson at Tue Feb 5 15:59:22 UTC 2019
Distributions LTSHaskell:0.4.0.2, NixOS:0.4.0.2, Stackage:0.4.0.2
Downloads 251 total (40 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-02-05 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees