daml/daml-assistant/BUILD.bazel
Moritz Kiefer ad10f98020
Fix SDK integration tests on Windows (#1125)
* Fix SDK integration tests on Windows

* Switch to Haskell-based tar extraction
2019-05-14 21:55:45 +02:00

133 lines
3.1 KiB
Python

# 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")
load("@os_info//:os_info.bzl", "is_windows")
# 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"]),
hazel_deps = [
"base",
"directory",
"extra",
"filepath",
"lens",
"safe-exceptions",
"semver",
"text",
"yaml",
],
src_strip_prefix = "daml-project-config",
visibility = ["//visibility:public"],
deps = [],
)
da_haskell_library(
name = "daml-lib",
srcs = native.glob(
["src/**/*.hs"],
exclude = [
"src/DAML/Assistant.hs",
"src/DAML/Assistant/Tests.hs",
],
),
hazel_deps = [
"aeson",
"base",
"bytestring",
"conduit",
"conduit-extra",
"directory",
"extra",
"filepath",
"http-client",
"http-client-tls",
"http-conduit",
"lens",
"optparse-applicative",
"process",
"safe",
"safe-exceptions",
"semver",
"tar-conduit",
"tasty",
"tasty-hunit",
"tasty-quickcheck",
"temporary",
"terminal-progress-bar",
"text",
"time",
"tls",
"unix-compat",
"utf8-string",
"yaml",
] + (["Win32"] if is_windows else []),
src_strip_prefix = "src",
visibility = ["//visibility:public"],
deps = [
":daml-project-config",
"//libs-haskell/da-hs-base",
],
)
da_haskell_binary(
name = "daml",
srcs = ["exe/DAML/Assistant.hs"],
hazel_deps = [
"base",
"directory",
"extra",
"filepath",
"process",
"safe-exceptions",
"text",
],
main_function = "DAML.Assistant.main",
src_strip_prefix = "exe",
visibility = ["//visibility:public"],
deps = [
":daml-lib",
":daml-project-config",
"//libs-haskell/da-hs-base",
],
)
package_app(
name = "daml-dist",
binary = ":daml",
visibility = ["//visibility:public"],
)
da_haskell_test(
name = "test",
srcs = ["test/DAML/Assistant/Tests.hs"],
hazel_deps = [
"base",
"conduit",
"conduit-extra",
"directory",
"extra",
"filepath",
"safe-exceptions",
"tar-conduit",
"tasty",
"tasty-hunit",
"tasty-quickcheck",
"temporary",
"text",
"unix-compat",
],
main_function = "DAML.Assistant.Tests.main",
src_strip_prefix = "test",
visibility = ["//visibility:public"],
deps = [
":daml-lib",
":daml-project-config",
"//libs-haskell/da-hs-base",
],
)