daml/daml-assistant/BUILD.bazel

117 lines
2.8 KiB
Python
Raw Normal View History

2019-04-04 11:33:38 +03:00
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load("//bazel_tools:haskell.bzl", "da_haskell_binary", "da_haskell_library", "da_haskell_test")
load("//bazel_tools:packaging/packaging.bzl", "package_app")
2019-04-04 11:33:38 +03:00
# This library is intended to be used by applications called by the assistant,
# e.g., damlc, to get the names of the various environment variables set by the assistant.
da_haskell_library(
name = "daml-project-config",
srcs = native.glob(["daml-project-config/**/*.hs"]),
2019-04-04 11:33:38 +03:00
hazel_deps = [
"base",
"directory",
2019-04-05 20:34:23 +03:00
"extra",
2019-04-04 11:33:38 +03:00
"filepath",
"lens",
2019-04-04 11:33:38 +03:00
"safe-exceptions",
"semver",
2019-04-05 20:34:23 +03:00
"text",
"yaml",
2019-04-04 11:33:38 +03:00
],
src_strip_prefix = "daml-project-config",
visibility = ["//visibility:public"],
deps = [],
2019-04-04 11:33:38 +03:00
)
# TODO Factor shared code between the binary and the test suite into a library
# instead of compiling it twice.
da_haskell_binary(
name = "daml",
srcs = native.glob(["src/**/*.hs"]),
hazel_deps = [
"aeson",
"base",
"bytestring",
"conduit",
"conduit-extra",
"directory",
"extra",
"filepath",
"http-conduit",
"lens",
"main-tester",
"optparse-applicative",
"process",
"safe",
"safe-exceptions",
"semver",
"tar-conduit",
"tasty",
"tasty-hunit",
"tasty-quickcheck",
"temporary",
"terminal-progress-bar",
"text",
"unix-compat",
"utf8-string",
"yaml",
],
2019-04-04 11:33:38 +03:00
main_function = "DAML.Assistant.main",
src_strip_prefix = "src",
visibility = ["//visibility:public"],
2019-04-04 11:33:38 +03:00
deps = [
":daml-project-config",
"//libs-haskell/da-hs-base",
2019-04-04 11:33:38 +03:00
],
)
package_app(
name = "daml-dist",
binary = ":daml",
visibility = ["//visibility:public"],
)
da_haskell_test(
name = "test",
srcs = native.glob(["src/**/*.hs"]),
hazel_deps = [
"aeson",
"base",
"bytestring",
"conduit",
"conduit-extra",
"directory",
"extra",
"filepath",
"http-conduit",
"lens",
"main-tester",
"optparse-applicative",
"process",
"safe",
"safe-exceptions",
"semver",
"tar-conduit",
"tasty",
"tasty-hunit",
"tasty-quickcheck",
"temporary",
"terminal-progress-bar",
"text",
"unix-compat",
"utf8-string",
"yaml",
],
2019-04-04 11:33:38 +03:00
main_function = "DAML.Assistant.runTests",
visibility = ["//visibility:public"],
2019-04-04 11:33:38 +03:00
deps = [
":daml-project-config",
"//libs-haskell/da-hs-base",
2019-04-04 11:33:38 +03:00
],
)
exports_files(["daml-studio.py"])