forked from awakesecurity/proto3-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proto3-suite.cabal
253 lines (227 loc) · 8.26 KB
/
proto3-suite.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
cabal-version: 2.2
name: proto3-suite
version: 0.7.0
synopsis: A higher-level API to the proto3-wire library
description:
This library provides a higher-level API to <https://github.com/awakesecurity/proto3-wire the `proto3-wire` library>
that supports:
.
- Type classes for encoding and decoding messages, and instances for all wire
formats identified in the specification
- A higher-level approach to encoding and decoding, based on `GHC.Generics`
- A way of creating `.proto` files from Haskell types.
.
See <https://hackage.haskell.org/package/proto3-suite/docs/Proto3-Suite-Tutorial.html the `Proto3.Suite.Tutorial` module>
for more details.
.
license: Apache-2.0
author: Arista Networks <opensource@awakesecurity.com>
maintainer: Arista Networks <opensource@awakesecurity.com>
copyright: 2017-2020 Awake Security, 2021-2022 Arista Networks
category: Codec
build-type: Simple
data-files: test-files/*.bin tests/encode.sh tests/decode.sh
extra-source-files: CHANGELOG.md, gen/.gitignore
flag dhall
Description: Turn on Dhall interpret and inject codegen
Default: False
Manual: True
flag swagger
Description: Turn on Swagger doc generation.
Default: True
Manual: True
flag swagger-wrapper-format
Description: Change Swagger schema format for Protobuf wrapper types
Default: False
Manual: True
flag large-records
Description: Generate records with smaller core code size using the large-records library
Default: True
Manual: True
source-repository head
type: git
location: https://github.com/awakesecurity/proto3-suite
common common
default-extensions:
DeriveDataTypeable DeriveGeneric
library
import: common
if flag(dhall)
exposed-modules: Proto3.Suite.DhallPB
build-depends: dhall >=1.13 && < 1.43
cpp-options: -DDHALL
if flag(swagger)
exposed-modules: Proto3.Suite.DotProto.Generate.Swagger
Proto3.Suite.DotProto.Generate.Swagger.Wrappers
build-depends: swagger2 >=2.1.6 && <2.9
cpp-options: -DSWAGGER
if flag(swagger-wrapper-format)
hs-source-dirs: src/swagger-wrapper-format
else
hs-source-dirs: src/no-swagger-wrapper-format
if flag(large-records)
-- large-records support uses newer Dhall APIs. So we need at least 1.34.
build-depends: dhall >=1.34 && < 1.43,
large-generics,
large-records
cpp-options: -DLARGE_RECORDS
exposed-modules: Proto3.Suite
Proto3.Suite.Class
Proto3.Suite.DotProto
Proto3.Suite.DotProto.Generate
Proto3.Suite.DotProto.Generate.LargeRecord
Proto3.Suite.DotProto.Generate.Record
Proto3.Suite.DotProto.Generate.Syntax
Proto3.Suite.DotProto.AST
Proto3.Suite.DotProto.AST.Lens
Proto3.Suite.DotProto.Parsing
Proto3.Suite.DotProto.Rendering
Proto3.Suite.JSONPB
Proto3.Suite.Tutorial
Proto3.Suite.Types
Google.Protobuf.Timestamp
Google.Protobuf.Wrappers.Polymorphic
Proto3.Suite.DotProto.Internal
Proto3.Suite.JSONPB.Class
other-modules: Turtle.Compat
build-depends: aeson >= 1.1.1.0,
aeson-pretty,
attoparsec >= 0.13.0.1,
base >=4.8 && <5.0,
base64-bytestring >= 1.0.0.1 && < 1.3,
binary >=0.8.3,
bytestring >= 0.10.6.0 && < 0.13,
deepseq >= 1.4 && < 1.6,
cereal >= 0.5.1 && <0.6,
containers >=0.5 && < 0.7,
contravariant >=1.4 && <1.6,
filepath,
foldl,
hashable,
haskell-src ==1.0.*,
insert-ordered-containers,
lens,
mtl >= 2.2 && < 2.4,
neat-interpolation,
parsec >= 3.1.9 && <3.2.0,
parsers >= 0.12 && <0.13,
pretty ==1.1.*,
pretty-show >= 1.6.12 && < 2.0,
proto3-wire >= 1.2.2 && < 1.5,
QuickCheck >=2.10 && <2.15,
quickcheck-instances >=0.3.26 && < 0.4,
safe ==0.3.*,
split,
system-filepath,
time,
text >= 0.2 && < 2.2,
text-short >=0.1.3 && <0.2,
transformers >= 0.4 && < 0.7,
turtle < 1.6.0 || >= 1.6.1 && < 1.7.0,
vector >= 0.11 && < 0.14,
attoparsec-aeson
if !impl(ghc >= 8.0)
build-depends: semigroups >= 0.18 && < 0.20
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -O2 -Wall
test-suite tests
import: common
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs:
gen
tests
if flag(dhall)
other-modules: TestDhall
build-depends: dhall >=1.13 && < 1.43
cpp-options: -DDHALL
if flag(swagger)
build-depends: swagger2
cpp-options: -DSWAGGER
if flag(swagger-wrapper-format)
cpp-options: -DSWAGGER_WRAPPER_FORMAT
if flag(large-records)
build-depends: large-generics,
large-records
cpp-options: -DLARGE_RECORDS
autogen-modules:
TestProto
TestProtoImport
TestProtoOneof
TestProtoOneofImport
TestProtoWrappers
TestProtoNestedMessage
other-modules:
ArbitraryGeneratedTestTypes
TestCodeGen
TestProto
TestProtoImport
TestProtoOneof
TestProtoOneofImport
TestProtoWrappers
--TestProtoLeadingDot
TestProtoNestedMessage
--TestProtoProtocPlugin
Test.Proto.Generate.Name
Test.Proto.Generate.Name.Gen
Test.Proto.Parse.Gen
Test.Proto.Parse.Option
build-depends:
aeson >= 1.1.1.0 && < 2.2
, attoparsec >= 0.13.0.1
, base >=4.8 && <5.0
, base64-bytestring >= 1.0.0.1 && < 1.3
, bytestring >= 0.10.6.0 && < 0.13.0
, cereal >= 0.5.1 && <0.6
, containers >=0.5 && < 0.7
, deepseq >= 1.4 && < 1.6
, doctest
, generic-arbitrary
, hedgehog
, mtl >= 2.2 && < 2.4
, parsec >= 3.1.9 && <3.2.0
, pretty ==1.1.*
, pretty-show >= 1.6.12 && < 2.0
, proto3-suite
, proto3-wire >= 1.2 && < 1.5
, QuickCheck >=2.10 && <2.15
, record-hasfield
, tasty >= 0.11 && <1.5
, tasty-hedgehog
, tasty-hunit >= 0.9 && <0.11
, tasty-quickcheck >= 0.8.4 && <0.11
, text >= 0.2 && <2.2
, text-short >=0.1.3 && <0.2
, transformers >= 0.4 && < 0.7
, turtle
, vector >=0.11 && < 0.14
if !impl(ghc >= 8.0)
build-depends: semigroups >= 0.18 && < 0.20
ghc-options: -O2 -Wall
executable compile-proto-file
main-is: Main.hs
hs-source-dirs: tools/compile-proto-file
default-language: Haskell2010
build-depends: base >=4.12 && <5.0
, optparse-applicative
, proto3-suite
, system-filepath
, text
, turtle
ghc-options: -O2 -Wall
executable canonicalize-proto-file
main-is: Main.hs
hs-source-dirs: tools/canonicalize-proto-file
default-language: Haskell2010
build-depends: base >=4.11.0.0 && <5.0
, containers >=0.5 && <0.7
, mtl >= 2.2 && < 2.4
, optparse-generic
, proto3-suite
, proto3-wire >= 1.2 && <1.5
, range-set-list >=0.1.2 && <0.2
, system-filepath
, turtle
ghc-options: -O2 -Wall