-
Notifications
You must be signed in to change notification settings - Fork 1
/
etlas.dhall
142 lines (133 loc) · 5.15 KB
/
etlas.dhall
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
let prelude =
https://raw.githubusercontent.com/eta-lang/dhall-to-etlas/master/dhall/prelude.dhall
let types =
https://raw.githubusercontent.com/eta-lang/dhall-to-etlas/master/dhall/types.dhall
let v = prelude.v
let Guarded =
https://raw.githubusercontent.com/eta-lang/dhall-to-etlas/master/dhall/types/Guarded.dhall
let pkg =
λ(name : Text)
→ λ(version-range : types.VersionRange)
→ { bounds = version-range, package = name }
let pkgAnyVer = λ(packageName : Text) → pkg packageName prelude.anyVersion
let etaImpl =
λ(cfg : types.Config)
→ λ(ver : types.VersionRange)
→ cfg.impl (types.Compiler.Eta {=}) ver
let updateRepo =
prelude.utils.mapSourceRepos
( λ(srcRepo : types.SourceRepo)
→ srcRepo
⫽ { tag =
[ "0.1.5.1" ] : Optional Text
, kind =
types.RepoKind.RepoThis {=}
}
)
let project =
prelude.utils.GitHub-project { owner = "jneira", repo = "wai-servlet" }
in updateRepo
( project
⫽ { description =
"Integration of eta wai applications with the servlet api"
, license =
types.License.BSD3 {=}
, license-files =
[ "LICENSE" ]
, author =
"Javier Neira Sanchez"
, maintainer =
"Javier Neira Sanchez <[email protected]>"
, version =
v "0.1.5.1"
, cabal-version =
v "1.12"
, category =
"Web"
, extra-source-files =
[ "README.md" ]
, stability =
"Experimental"
, flags =
[ { default =
False
, description =
"print debug output. not suitable for production"
, manual =
False
, name =
"wai-servlet-debug"
}
]
, library =
Some
( λ(config : types.Config)
→ prelude.defaults.Library
⫽ { exposed-modules =
[ "Network.Wai.Servlet"
, "Network.Wai.Servlet.Examples"
]
, other-modules =
[ "Network.Wai.Servlet.Request"
, "Network.Wai.Servlet.Response"
, "Network.Wai.Servlet.File"
, "Network.Wai.Servlet.Settings"
, "Javax.Servlet"
]
, hs-source-dirs =
[ "src" ]
, default-language =
Some (types.Languages.Haskell2010 {=})
, build-depends =
[ pkg
"base"
( prelude.intersectVersionRanges
(prelude.orLaterVersion (v "4.8"))
(prelude.earlierVersion (v "4.9"))
)
, pkgAnyVer "wai"
, pkgAnyVer "network"
, pkg "http-types" (prelude.orLaterVersion (v "0.10"))
, pkgAnyVer "http-date"
, pkgAnyVer "blaze-builder"
, pkgAnyVer "bytestring"
, pkgAnyVer "case-insensitive"
, pkgAnyVer "hashable"
, pkgAnyVer "utf8-string"
]
# ( if etaImpl
config
(prelude.orLaterVersion (v "0.0.9.7"))
then [ pkgAnyVer "eta-java-interop" ]
else [] : List types.Dependency
)
, maven-depends =
[ "javax.servlet:servlet-api:2.5" ]
, java-sources =
if etaImpl
config
(prelude.orLaterVersion (v "0.0.9"))
then [ "java/Utils.java" ]
else [ "java/eta-0.0.6/Utils.java" ]
, cpp-options =
( if etaImpl
config
(prelude.orLaterVersion (v "0.0.9.7"))
then [ "-DINTEROP" ]
else [] : List Text
)
# ( if etaImpl
config
(prelude.orEarlierVersion (v "0.7.0.2"))
then [ "-DPURE_JAVA_WITH" ]
else [] : List Text
)
# ( if config.flag "wai-servlet-debug"
then [ "-DWAI_SERVLET_DEBUG" ]
else [] : List Text
)
}
)
: Optional (Guarded types.Library)
}
)