mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
49e19ebed1
* Make compat tests work on windows This required some changes to the daml_sdk rule since the read-only installation by the assistant breaks Bazel completely. We could only apply those changes on Windows but I think I prefer the consistency across platforms here over trying to stay close to how the SDK is installed on user machines given that the SDK installation is not something we’ve had issues with. I’ve excluded the postgresql tests for now. I don’t expect them to be particularly hard to fix but I’ve already spent almost 2 days on this and having some tests run on Windows seems like a clear improvement over running no tests on Windows :) changelog_begin changelog_end * Remove todo changelog_begin changelog_end
63 lines
2.6 KiB
Python
63 lines
2.6 KiB
Python
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
# The dependencies of the daml workspace.
|
|
# This allows using the daml workspace externally
|
|
# from another bazel workspace.
|
|
#
|
|
# For example, another Bazel project can depend on
|
|
# targets in the daml repository by doing:
|
|
# ---
|
|
# local_repository(
|
|
# name = "com_github_digital_asset_daml",
|
|
# path = "/path/to/daml"
|
|
# )
|
|
# load("@com_github_digital_asset_daml//:deps.bzl", "daml_deps")
|
|
# daml_deps()
|
|
# ---
|
|
#
|
|
# A 3rd-party consumer would also need to register relevant
|
|
# toolchains and repositories in order to build targets.
|
|
# That is, copy some setup calls from WORKSPACE into the
|
|
# other WORKSPACE.
|
|
#
|
|
# Make sure to reference repository local files with the full
|
|
# prefix: @com_github_digital_asset_daml//..., as these won't
|
|
# be resolvable from external workspaces otherwise.
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
|
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
|
load("@daml//:deps.bzl", "buildifier_sha256", "buildifier_version", "rules_haskell_sha256", "rules_haskell_version", "rules_nixpkgs_sha256", "rules_nixpkgs_version")
|
|
|
|
def daml_deps():
|
|
if "rules_haskell" not in native.existing_rules():
|
|
http_archive(
|
|
name = "rules_haskell",
|
|
strip_prefix = "rules_haskell-%s" % rules_haskell_version,
|
|
urls = ["https://github.com/tweag/rules_haskell/archive/%s.tar.gz" % rules_haskell_version],
|
|
patches = [
|
|
"@daml//bazel_tools:haskell-strict-source-names.patch",
|
|
"@daml//bazel_tools:haskell-windows-remove-fake-libs.patch",
|
|
"@daml//bazel_tools:haskell-windows-extra-libraries.patch",
|
|
],
|
|
patch_args = ["-p1"],
|
|
sha256 = rules_haskell_sha256,
|
|
)
|
|
|
|
if "io_tweag_rules_nixpkgs" not in native.existing_rules():
|
|
http_archive(
|
|
name = "io_tweag_rules_nixpkgs",
|
|
strip_prefix = "rules_nixpkgs-%s" % rules_nixpkgs_version,
|
|
urls = ["https://github.com/tweag/rules_nixpkgs/archive/%s.tar.gz" % rules_nixpkgs_version],
|
|
sha256 = rules_nixpkgs_sha256,
|
|
)
|
|
|
|
if "com_github_bazelbuild_buildtools" not in native.existing_rules():
|
|
http_archive(
|
|
name = "com_github_bazelbuild_buildtools",
|
|
sha256 = buildifier_sha256,
|
|
strip_prefix = "buildtools-{}".format(buildifier_version),
|
|
url = "https://github.com/bazelbuild/buildtools/archive/{}.tar.gz".format(buildifier_version),
|
|
)
|