mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-05 03:56:26 +03:00
1a70bf68cc
* Install from GitHub releases! * Revert make-capsule script. * Refactor a little. * Reviewer comments
117 lines
2.8 KiB
Python
117 lines
2.8 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")
|
|
|
|
# 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 = [],
|
|
)
|
|
|
|
# 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",
|
|
],
|
|
main_function = "DAML.Assistant.main",
|
|
src_strip_prefix = "src",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":daml-project-config",
|
|
"//libs-haskell/da-hs-base",
|
|
],
|
|
)
|
|
|
|
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",
|
|
],
|
|
main_function = "DAML.Assistant.runTests",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":daml-project-config",
|
|
"//libs-haskell/da-hs-base",
|
|
],
|
|
)
|
|
|
|
exports_files(["daml-studio.py"])
|