-
Notifications
You must be signed in to change notification settings - Fork 15
/
BUILD.bazel
54 lines (50 loc) · 1.42 KB
/
BUILD.bazel
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
exports_files(["nixpkgs.nix"])
load(
"@rules_haskell//haskell:defs.bzl",
"ghc_plugin",
"haskell_library",
)
cc_library(
name = "bctable",
hdrs = ["cbits/bctable.h"],
srcs = ["cbits/bctable.c"],
strip_include_prefix = "cbits",
)
haskell_library(
name = "inline-java",
# cbits/bctable.h is included here so it can be found by Plugin.hs
# at the same location when building with bazel as with stack.
srcs = glob(['src/**/*.hs',
'src/**/*.hsc',
'cbits/bctable.h',
]),
visibility = ["//visibility:public"],
deps = [
"//jni",
"//jvm",
":bctable",
"@stackage//:Cabal",
"@stackage//:base",
"@stackage//:bytestring",
"@stackage//:directory",
"@stackage//:filemanip",
"@stackage//:filepath",
"@stackage//:ghc",
"@stackage//:language-java",
"@stackage//:linear-base",
"@stackage//:mtl",
"@stackage//:process",
"@stackage//:template-haskell",
"@stackage//:temporary",
"@stackage//:text",
],
)
ghc_plugin(
name = "inline-java-plugin",
args = ["$(JAVABASE)/bin/javac"],
module = "Language.Java.Inline.Plugin",
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = ["@bazel_tools//tools/jdk:current_java_runtime"],
visibility = ["//visibility:public"],
deps = [":inline-java"],
)