2022-01-03 19:36:51 +03:00
|
|
|
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2019-04-04 11:33:38 +03:00
|
|
|
# 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.
|
|
|
|
|
2019-07-01 14:26:19 +03:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
|
2019-04-04 11:33:38 +03:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
2020-07-30 18:53:16 +03:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
|
2019-04-04 11:33:38 +03:00
|
|
|
|
Disable writing volatile bits in Scala statsfile (#11875)
Make Scala targets deterministic by disabling writing milliseconds
timestamps into the statsfile.
Before (cache disabled)
```
$ n=1; bazel clean; bazel build //libs-scala/adjustable-clock --execution_log_json_file=execlog$n.json; rsync -aL bazel-bin output$n
$ n=2; bazel clean; bazel build //libs-scala/adjustable-clock --execution_log_json_file=execlog$n.json; rsync -aL bazel-bin output$n
$ diff -u execlog1.json execlog2.json
--- execlog1.json 2021-11-25 09:53:45.638891575 +0100
+++ execlog2.json 2021-11-25 10:01:52.831225558 +0100
@@ -311392,7 +311392,7 @@
}, {
"path": "bazel-out/k8-opt/bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile",
"digest": {
- "hash": "1c535baa94812c16d33b6b3dcf2dec8e12b77e3a28cd1280ca2c9678840c4de6",
+ "hash": "a7f6f1b168649c1c5346ff92c69f0095b68781690e4b3f33321d8f35af8b3d77",
"sizeBytes": "16",
"hashFunctionName": "SHA-256"
}
@@ -311705,7 +311705,7 @@
}, {
"path": "bazel-out/k8-opt/bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile",
"digest": {
- "hash": "b3af662512a906ec56abfb222f43af189b88b00ae0449bd44c25b7e90689c4db",
+ "hash": "d6c6e2a36754efea4863593a838fbfb500a66e0150d3c3e2e2490ad65c22a2cd",
"sizeBytes": "16",
"hashFunctionName": "SHA-256"
}
@@ -312025,7 +312025,7 @@
}, {
"path": "bazel-out/k8-opt/bin/libs-scala/adjustable-clock/adjustable-clock.statsfile",
"digest": {
- "hash": "4326088227e5ecf2c21e76ddb6d77c9692ef1689dd146f65ec1e75c235382251",
+ "hash": "8a6b23f3c64ce3ff171772808ca0064af52bc145a32d1b6398de124aeb813c97",
"sizeBytes": "16",
"hashFunctionName": "SHA-256"
}
$ diff -r output1 output2
diff -ur output1/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile output2/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile
--- output1/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile 2021-11-25 09:53:41.706824833 +0100
+++ output2/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/dependency_analyzer.statsfile 2021-11-25 10:01:49.047160467 +0100
@@ -1 +1 @@
-build_time=2507
+build_time=2522
diff -ur output1/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile output2/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile
--- output1/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile 2021-11-25 09:53:39.110780774 +0100
+++ output2/bazel-bin/external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/scala_version.statsfile 2021-11-25 10:01:46.427115402 +0100
@@ -1 +1 @@
-build_time=4162
+build_time=3946
diff -ur output1/bazel-bin/libs-scala/adjustable-clock/adjustable-clock.statsfile output2/bazel-bin/libs-scala/adjustable-clock/adjustable-clock.statsfile
--- output1/bazel-bin/libs-scala/adjustable-clock/adjustable-clock.statsfile 2021-11-25 09:53:45.282885532 +0100
+++ output2/bazel-bin/libs-scala/adjustable-clock/adjustable-clock.statsfile 2021-11-25 10:01:52.511220053 +0100
@@ -1 +1 @@
-build_time=3158
+build_time=3100
```
After (cache disabled)
```
$ n=3; bazel clean; bazel build //libs-scala/adjustable-clock --execution_log_json_file=execlog$n.json; rsync -aL bazel-bin output$n
$ n=4; bazel clean; bazel build //libs-scala/adjustable-clock --execution_log_json_file=execlog$n.json; rsync -aL bazel-bin output$n
$ diff -u execlog3.json execlog4.json
$ diff -ur output3 output4
```
See https://github.com/bazelbuild/rules_scala/pull/1298
changelog_begin
changelog_end
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-11-25 14:01:17 +03:00
|
|
|
rules_scala_version = "17791a18aa966cdf2babb004822e6c70a7decc76"
|
2022-02-01 15:39:42 +03:00
|
|
|
rules_scala_sha256 = "6899cddf7407d09266dddcf6faf9f2a8b414de5e2b35ef8b294418f559172f28"
|
2019-11-22 17:24:08 +03:00
|
|
|
|
2022-02-09 13:16:30 +03:00
|
|
|
rules_haskell_version = "e2a74e5c29588f2107daae7c438e0d4117fcafb3"
|
|
|
|
rules_haskell_sha256 = "db8bf1813a07948269e622f646be3e7acc2799664fce548ed6c1afbe141d7085"
|
2021-08-09 16:19:17 +03:00
|
|
|
rules_haskell_patches = [
|
|
|
|
# This is a daml specific patch and not upstreamable.
|
|
|
|
"@com_github_digital_asset_daml//bazel_tools:haskell-windows-extra-libraries.patch",
|
|
|
|
# This should be made configurable in rules_haskell.
|
|
|
|
# Remove this patch once that's available.
|
|
|
|
"@com_github_digital_asset_daml//bazel_tools:haskell-opt.patch",
|
2022-02-01 13:27:11 +03:00
|
|
|
# This should be upstreamed
|
|
|
|
"@com_github_digital_asset_daml//bazel_tools:haskell-rts-docs.patch",
|
|
|
|
# This should be upstreamed
|
|
|
|
"@com_github_digital_asset_daml//bazel_tools:haskell-ghc-includes.patch",
|
2021-08-09 16:19:17 +03:00
|
|
|
]
|
Revert "Switch to Bazel 5 (#12935)" (#12974)
This reverts commit 4c0118df4d0304153e8f6ed9e3cfb1a1295876df.
This breaks passing -p to bazel test for Haskell tests, e.g.,
bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p
--test_arg InterfaceEq
which breaks with something horrifying like
moritz@adjunction ~/daml (main)> bazel test //compiler/damlc/tests:integration-v1dev --test_arg -p --test_arg InterfaceEq
[dev-env] Building tools.bazel...
[dev-env] Built tools.bazel in /nix/store/m7gzlmr0pqjpl01ihgvazxgfs3sfwl61-bazel and linked to /home/moritz/daml/dev-env/var/gc-roots/bazel
[dev-env] Building tools.find...
[dev-env] Built tools.find in /nix/store/645v3545lcbx77wq7355rgdrgbhn5wx7-findutils-4.8.0 and linked to /home/moritz/daml/dev-env/var/gc-roots/find
INFO: Invocation ID: 034b3e45-851f-472e-ab71-b7f718829582
DEBUG: /home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/rules_haskell/haskell/private/versions.bzl:60:10: WARNING: bazel version is too recent. Supported versions range from 4.0.0 to 4.2.1, but found: 5.0.0- (@non-git)
/nix/store/dadkhf8vch2i2kvig962ilfr5j3chshr-go-1.17.6
/nix/store/pzh24n543i6jqa01hdmgqknlyf294bn1-bazel-nixpkgs-posix-toolchain
/nix/store/2hfwndk47wpvaib06qyhcdp83b423xvh-jq-1.6-bin
/nix/store/hjggs9s82qh7r5j8sgapn389hf24wdx8-bazel-nixpkgs-cc-toolchain
/nix/store/yxgg3bn4v288sc00kf09svrwz2r461c9-ghc-native-bignum-9.0.2
/nix/store/2hwx0jhcdsx3wfvmb50ih19jkh2ra4jh-glibc-locales-2.33-108
/nix/store/8wpmx049z8m0ffhy3jyi41qb6pbxwvy8-bazel-nixpkgs-java-runtime
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 3d79fe1470dcb842d5944c98dfe7a62715db6d86fdb12d3ff60af3bdf41b7996
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.pic.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: file 'external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o' is generated by these conflicting actions:
Label: @bazel_tools//src/tools/launcher:launcher
RuleClass: cc_binary rule
Configuration: 869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9, 8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c
Mnemonic: CppCompile
Action key: 9f46e824944add9e9951ef51ddb6cb4b744bc97f90b5749132179d1d1699dfa1
Progress message: Compiling src/tools/launcher/dummy.cc
PrimaryInput: File:[/home/moritz/.cache/bazel/_bazel_moritz/bb4e4404f889dc1b816f246b08c0d9ea/external/bazel_tools[source]]src/tools/launcher/dummy.cc
PrimaryOutput: File:[[<execution_root>]bazel-out/k8-opt/bin]external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o
Owner information: ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[869f6bbd14d2ac66dcacb164312d88fa059b017e3c17513cb5051b23879ac7f9]}, ConfiguredTargetKey{label=@bazel_tools//src/tools/launcher:launcher, config=BuildConfigurationValue.Key[8c138cc79f95329f01b0d325511ad0ea89ca5126e421e67e5239706d0f247c2c]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: com.google.devtools.build.lib.skyframe.ArtifactConflictFinder$ConflictException: com.google.devtools.build.lib.actions.MutableActionGraph$ActionConflictException: for external/bazel_tools/src/tools/launcher/_objs/launcher/dummy.o, previous action: action 'Compiling src/tools/launcher/dummy.cc', attempted action: action 'Compiling src/tools/launcher/dummy.cc'
changelog_begin
changelog_end
2022-02-16 21:24:00 +03:00
|
|
|
rules_nixpkgs_version = "81f61c4b5afcf50665b7073f7fce4c1755b4b9a3"
|
|
|
|
rules_nixpkgs_sha256 = "33fd540d0283cf9956d0a5a640acb1430c81539a84069114beaf9640c96d221a"
|
2021-08-09 16:19:17 +03:00
|
|
|
rules_nixpkgs_patches = [
|
|
|
|
# On CI and locally we observe occasional segmantation faults
|
|
|
|
# of nix. A known issue since Nix 2.2.2 is that HTTP2 support
|
|
|
|
# can cause such segmentation faults. Since Nix 2.3.2 it is
|
|
|
|
# possible to disable HTTP2 via a command-line flag, which
|
|
|
|
# reportedly solves the issue. See
|
|
|
|
# https://github.com/NixOS/nix/issues/2733#issuecomment-518324335
|
|
|
|
"@com_github_digital_asset_daml//bazel_tools:nixpkgs-disable-http2.patch",
|
|
|
|
]
|
|
|
|
|
2021-02-11 12:08:47 +03:00
|
|
|
buildifier_version = "4.0.0"
|
|
|
|
buildifier_sha256 = "0d3ca4ed434958dda241fb129f77bd5ef0ce246250feed2d5a5470c6f29a77fa"
|
2020-07-27 18:44:27 +03:00
|
|
|
zlib_version = "1.2.11"
|
|
|
|
zlib_sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff"
|
2022-01-18 17:52:39 +03:00
|
|
|
rules_nodejs_version = "4.6.1"
|
|
|
|
rules_nodejs_sha256 = "d63ecec7192394f5cc4ad95a115f8a6c9de55c60d56c1f08da79c306355e4654"
|
2020-07-27 21:50:13 +03:00
|
|
|
rules_jvm_external_version = "3.3"
|
|
|
|
rules_jvm_external_sha256 = "d85951a92c0908c80bd8551002d66cb23c3434409c814179c0ff026b53544dab"
|
2021-11-23 21:58:55 +03:00
|
|
|
rules_go_version = "0.29.0"
|
|
|
|
rules_go_sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f"
|
2021-11-25 23:51:24 +03:00
|
|
|
bazel_gazelle_version = "67a3e22af6547f43bb9b8e4dd0bad5f354ad4e60"
|
|
|
|
bazel_gazelle_sha256 = "c71b12d890d1e299e012bfa6f08dc3d9e57281a0955dc28a1e9c16769d556203"
|
2020-12-08 08:59:23 +03:00
|
|
|
rules_bazel_common_version = "9e3880428c1837db9fb13335ed390b7e33e346a7"
|
2022-02-01 15:39:42 +03:00
|
|
|
rules_bazel_common_sha256 = "5290e0c8e0b7639f20b70f8d0046b50ad340cb55a4733545f6ec8f43af8727fe"
|
2020-03-31 21:10:46 +03:00
|
|
|
|
|
|
|
# Recent davl.
|
2020-10-09 16:45:02 +03:00
|
|
|
davl_version = "f2d7480d118f32626533d6a150a8ee7552cc0222" # 2020-03-23, "Deploy upgrade to SDK 0.13.56-snapshot.20200318",https://github.com/digital-asset/davl/pull/233/commits.
|
2020-03-31 21:10:46 +03:00
|
|
|
davl_sha256 = "3e8ae2a05724093e33b7f0363381e81a7e8e9655ccb3aa47ad540ea87e814321"
|
|
|
|
|
|
|
|
# Pinned davl relied on by damlc packaging tests.
|
|
|
|
davl_v3_version = "51d3977be2ab22f7f4434fd4692ca2e17a7cce23"
|
|
|
|
davl_v3_sha256 = "e8e76e21b50fb3adab36df26045b1e8c3ee12814abc60f137d39b864d2eae166"
|
2019-07-05 17:04:47 +03:00
|
|
|
|
2020-05-05 20:35:30 +03:00
|
|
|
# daml cheat sheet
|
2021-10-11 12:32:39 +03:00
|
|
|
daml_cheat_sheet_version = "2710b8df28d97253b5487a68feb2d1452d29fc54" # 2021-09-17
|
|
|
|
daml_cheat_sheet_sha256 = "eb022565a929a69d869f0ab0497f02d1a3eacb4dafdafa076a82ecbe7c401315"
|
2020-05-05 20:35:30 +03:00
|
|
|
|
2021-02-17 12:15:57 +03:00
|
|
|
platforms_version = "0.0.3"
|
|
|
|
platforms_sha256 = "15b66b5219c03f9e8db34c1ac89c458bb94bfe055186e5505d5c6f09cb38307f"
|
|
|
|
|
2019-04-04 11:33:38 +03:00
|
|
|
def daml_deps():
|
2021-02-17 12:15:57 +03:00
|
|
|
if "platforms" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "platforms",
|
|
|
|
sha256 = platforms_sha256,
|
|
|
|
strip_prefix = "platforms-{}".format(platforms_version),
|
|
|
|
urls = ["https://github.com/bazelbuild/platforms/archive/{version}.tar.gz".format(version = platforms_version)],
|
|
|
|
)
|
|
|
|
|
2019-08-13 17:46:31 +03:00
|
|
|
if "rules_haskell" not in native.existing_rules():
|
2019-04-12 14:10:16 +03:00
|
|
|
http_archive(
|
2019-08-13 17:46:31 +03:00
|
|
|
name = "rules_haskell",
|
2019-04-12 14:10:16 +03:00
|
|
|
strip_prefix = "rules_haskell-%s" % rules_haskell_version,
|
|
|
|
urls = ["https://github.com/tweag/rules_haskell/archive/%s.tar.gz" % rules_haskell_version],
|
2021-08-09 16:19:17 +03:00
|
|
|
patches = rules_haskell_patches,
|
2019-04-12 14:10:16 +03:00
|
|
|
patch_args = ["-p1"],
|
|
|
|
sha256 = rules_haskell_sha256,
|
|
|
|
)
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
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],
|
2019-11-15 13:50:12 +03:00
|
|
|
sha256 = rules_nixpkgs_sha256,
|
2021-08-09 16:19:17 +03:00
|
|
|
patches = rules_nixpkgs_patches,
|
2020-02-06 18:15:11 +03:00
|
|
|
patch_args = ["-p1"],
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
if "com_github_madler_zlib" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "com_github_madler_zlib",
|
|
|
|
build_file = "@com_github_digital_asset_daml//3rdparty/c:zlib.BUILD",
|
2020-05-05 20:40:03 +03:00
|
|
|
strip_prefix = "zlib-{}".format(zlib_version),
|
2020-07-27 18:44:27 +03:00
|
|
|
urls = ["https://github.com/madler/zlib/archive/v{}.tar.gz".format(zlib_version)],
|
2020-05-05 20:40:03 +03:00
|
|
|
sha256 = zlib_sha256,
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2021-11-25 23:51:24 +03:00
|
|
|
if "go_googleapis" not in native.existing_rules():
|
|
|
|
# The Haskell gRPC bindings require access to the status.proto source file.
|
|
|
|
# This import of go_googleapis is taken from rules_go and extended with the status.proto patch.
|
|
|
|
http_archive(
|
|
|
|
name = "go_googleapis",
|
|
|
|
# master, as of 2021-10-06
|
|
|
|
urls = [
|
|
|
|
"https://mirror.bazel.build/github.com/googleapis/googleapis/archive/409e134ffaacc243052b08e6fb8e2d458014ed37.zip",
|
|
|
|
"https://github.com/googleapis/googleapis/archive/409e134ffaacc243052b08e6fb8e2d458014ed37.zip",
|
|
|
|
],
|
|
|
|
sha256 = "a85c6a00e9cf0f004992ebea1d10688e3beea9f8e1a5a04ee53f367e72ee85af",
|
|
|
|
strip_prefix = "googleapis-409e134ffaacc243052b08e6fb8e2d458014ed37",
|
|
|
|
patches = [
|
|
|
|
# releaser:patch-cmd find . -name BUILD.bazel -delete
|
|
|
|
"@io_bazel_rules_go//third_party:go_googleapis-deletebuild.patch",
|
|
|
|
# set gazelle directives; change workspace name
|
|
|
|
"@io_bazel_rules_go//third_party:go_googleapis-directives.patch",
|
|
|
|
# releaser:patch-cmd gazelle -repo_root .
|
|
|
|
"@io_bazel_rules_go//third_party:go_googleapis-gazelle.patch",
|
|
|
|
# The Haskell gRPC bindings require access to the status.proto source file.
|
|
|
|
"//bazel_tools:googleapis-status-proto.patch",
|
|
|
|
],
|
|
|
|
patch_args = ["-E", "-p1"],
|
|
|
|
)
|
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
if "io_bazel_rules_go" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_go",
|
2019-11-20 17:27:32 +03:00
|
|
|
urls = [
|
2021-11-23 21:58:55 +03:00
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v{version}/rules_go-v{version}.zip".format(version = rules_go_version),
|
|
|
|
"https://github.com/bazelbuild/rules_go/releases/download/v{version}/rules_go-v{version}.zip".format(version = rules_go_version),
|
2019-11-20 17:27:32 +03:00
|
|
|
],
|
2020-07-27 18:44:27 +03:00
|
|
|
sha256 = rules_go_sha256,
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-10-28 15:53:14 +03:00
|
|
|
if "rules_jvm_external" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "rules_jvm_external",
|
2020-05-28 16:02:54 +03:00
|
|
|
strip_prefix = "rules_jvm_external-{}".format(rules_jvm_external_version),
|
|
|
|
sha256 = rules_jvm_external_sha256,
|
|
|
|
url = "https://github.com/bazelbuild/rules_jvm_external/archive/{}.zip".format(rules_jvm_external_version),
|
2019-10-28 15:53:14 +03:00
|
|
|
)
|
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
if "io_bazel_rules_scala" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_scala",
|
2022-02-01 15:39:42 +03:00
|
|
|
url = "https://github.com/bazelbuild/rules_scala/archive/%s.tar.gz" % rules_scala_version,
|
2019-04-12 14:10:16 +03:00
|
|
|
strip_prefix = "rules_scala-%s" % rules_scala_version,
|
2020-05-28 16:02:54 +03:00
|
|
|
sha256 = rules_scala_sha256,
|
2019-05-16 19:04:30 +03:00
|
|
|
patches = [
|
|
|
|
"@com_github_digital_asset_daml//bazel_tools:scala-escape-jvmflags.patch",
|
|
|
|
],
|
|
|
|
patch_args = ["-p1"],
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
if "bazel_gazelle" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "bazel_gazelle",
|
2019-12-09 14:43:20 +03:00
|
|
|
urls = [
|
2021-11-25 23:51:24 +03:00
|
|
|
"https://github.com/bazelbuild/bazel-gazelle/archive/{version}/bazel-gazelle-{version}.tar.gz".format(version = bazel_gazelle_version),
|
2019-12-09 14:43:20 +03:00
|
|
|
],
|
2021-11-25 23:51:24 +03:00
|
|
|
strip_prefix = "bazel-gazelle-{version}".format(version = bazel_gazelle_version),
|
2021-11-23 21:58:55 +03:00
|
|
|
sha256 = bazel_gazelle_sha256,
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
if "io_bazel_rules_sass" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_sass",
|
2020-01-16 17:55:32 +03:00
|
|
|
sha256 = "7b9c9a88099d00dbb16be359c3b1946309d99673220c6b39c7e8bda8ecc692f8",
|
|
|
|
strip_prefix = "rules_sass-1.24.4",
|
|
|
|
urls = [
|
|
|
|
"https://github.com/bazelbuild/rules_sass/archive/1.24.4.zip",
|
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.24.4.zip",
|
|
|
|
],
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
# Fetch rules_nodejs so we can install our npm dependencies
|
|
|
|
if "build_bazel_rules_nodejs" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "build_bazel_rules_nodejs",
|
2020-05-13 11:39:51 +03:00
|
|
|
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/{}/rules_nodejs-{}.tar.gz".format(rules_nodejs_version, rules_nodejs_version)],
|
|
|
|
sha256 = rules_nodejs_sha256,
|
2020-01-20 18:02:33 +03:00
|
|
|
patches = [
|
2020-01-21 19:38:11 +03:00
|
|
|
# Work around for https://github.com/bazelbuild/rules_nodejs/issues/1565
|
2020-01-20 18:02:33 +03:00
|
|
|
"@com_github_digital_asset_daml//bazel_tools:rules_nodejs_npm_cli_path.patch",
|
2020-05-19 19:58:00 +03:00
|
|
|
"@com_github_digital_asset_daml//bazel_tools:rules_nodejs_node_dependency.patch",
|
2020-01-20 18:02:33 +03:00
|
|
|
],
|
|
|
|
patch_args = ["-p1"],
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
if "com_github_grpc_grpc" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "com_github_grpc_grpc",
|
2022-02-24 15:26:27 +03:00
|
|
|
strip_prefix = "grpc-1.44.0",
|
|
|
|
urls = ["https://github.com/grpc/grpc/archive/v1.44.0.tar.gz"],
|
|
|
|
sha256 = "8c05641b9f91cbc92f51cc4a5b3a226788d7a63f20af4ca7aaca50d92cc94a0d",
|
2019-04-12 14:10:16 +03:00
|
|
|
patches = [
|
|
|
|
"@com_github_digital_asset_daml//bazel_tools:grpc-bazel-mingw.patch",
|
2021-02-01 18:11:06 +03:00
|
|
|
],
|
|
|
|
patch_args = ["-p1"],
|
|
|
|
)
|
|
|
|
|
2021-12-02 22:25:26 +03:00
|
|
|
if "com_google_protobuf" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "com_google_protobuf",
|
2022-02-03 16:38:38 +03:00
|
|
|
sha256 = "4dd35e788944b7686aac898f77df4e9a54da0ca694b8801bd6b2a9ffc1b3085e",
|
|
|
|
strip_prefix = "protobuf-3.19.2",
|
2021-12-02 22:25:26 +03:00
|
|
|
urls = [
|
2022-02-03 16:38:38 +03:00
|
|
|
"https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.19.2.tar.gz",
|
2021-12-02 22:25:26 +03:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
if "io_grpc_grpc_java" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "io_grpc_grpc_java",
|
2022-02-03 16:38:38 +03:00
|
|
|
strip_prefix = "grpc-java-1.44.0",
|
|
|
|
urls = ["https://github.com/grpc/grpc-java/archive/v1.44.0.tar.gz"],
|
|
|
|
sha256 = "e3781bcab2a410a7cd138f13b2e6a643e111575f6811b154c570f4d020e87507",
|
2019-07-05 17:04:47 +03:00
|
|
|
patch_args = ["-p1"],
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
if "com_github_johnynek_bazel_jar_jar" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "com_github_johnynek_bazel_jar_jar",
|
2022-02-01 15:39:42 +03:00
|
|
|
sha256 = "64748da73bc82ecbbb2a872722690a3be52c06bb92a1c939136e2852470f308d",
|
2019-07-05 17:04:47 +03:00
|
|
|
strip_prefix = "bazel_jar_jar-20dbf71f09b1c1c2a8575a42005a968b38805519",
|
2022-02-01 15:39:42 +03:00
|
|
|
urls = ["https://github.com/johnynek/bazel_jar_jar/archive/20dbf71f09b1c1c2a8575a42005a968b38805519.tar.gz"], # Latest commit SHA as at 2019/02/13
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
|
|
|
|
2021-01-28 20:57:09 +03:00
|
|
|
if "com_github_bazelbuild_remote_apis" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "com_github_bazelbuild_remote_apis",
|
|
|
|
strip_prefix = "remote-apis-2.0.0",
|
|
|
|
urls = ["https://github.com/bazelbuild/remote-apis/archive/v2.0.0.tar.gz"],
|
|
|
|
sha256 = "79204ed1fa385c03b5235f65b25ced6ac51cf4b00e45e1157beca6a28bdb8043",
|
|
|
|
patches = ["@com_github_digital_asset_daml//:bazel_tools/remote_apis_no_services.patch"],
|
|
|
|
patch_args = ["-p1"],
|
|
|
|
)
|
2019-04-12 14:10:16 +03:00
|
|
|
|
2019-04-23 15:56:40 +03:00
|
|
|
# Buildifier.
|
|
|
|
# It is written in Go and hence needs rules_go to be available.
|
|
|
|
if "com_github_bazelbuild_buildtools" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "com_github_bazelbuild_buildtools",
|
2020-04-24 15:04:14 +03:00
|
|
|
sha256 = buildifier_sha256,
|
|
|
|
strip_prefix = "buildtools-{}".format(buildifier_version),
|
|
|
|
url = "https://github.com/bazelbuild/buildtools/archive/{}.tar.gz".format(buildifier_version),
|
2019-04-23 15:56:40 +03:00
|
|
|
)
|
|
|
|
|
2019-04-12 14:10:16 +03:00
|
|
|
native.bind(
|
|
|
|
name = "guava",
|
|
|
|
actual = "@com_google_guava_guava//jar",
|
|
|
|
)
|
|
|
|
native.bind(
|
|
|
|
name = "gson",
|
|
|
|
actual = "@com_google_code_gson_gson//jar",
|
|
|
|
)
|
2019-05-14 10:40:30 +03:00
|
|
|
|
|
|
|
if "com_github_google_bazel_common" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "com_github_google_bazel_common",
|
2020-12-08 08:59:23 +03:00
|
|
|
sha256 = rules_bazel_common_sha256,
|
|
|
|
strip_prefix = "bazel-common-{}".format(rules_bazel_common_version),
|
2022-02-01 15:39:42 +03:00
|
|
|
urls = ["https://github.com/google/bazel-common/archive/{}.tar.gz".format(rules_bazel_common_version)],
|
2019-05-14 10:40:30 +03:00
|
|
|
)
|
2019-12-09 14:43:20 +03:00
|
|
|
|
2020-07-30 18:53:16 +03:00
|
|
|
maybe(
|
|
|
|
http_archive,
|
|
|
|
name = "rules_pkg",
|
|
|
|
urls = [
|
2020-09-25 13:35:34 +03:00
|
|
|
"https://github.com/bazelbuild/rules_pkg/releases/download/0.2.6-1/rules_pkg-0.2.6.tar.gz",
|
2020-07-30 18:53:16 +03:00
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz",
|
|
|
|
],
|
|
|
|
sha256 = "aeca78988341a2ee1ba097641056d168320ecc51372ef7ff8e64b139516a4937",
|
|
|
|
)
|
|
|
|
|
2019-12-09 14:43:20 +03:00
|
|
|
if "com_github_grpc_ecosystem_grpc_health_probe_binary" not in native.existing_rules():
|
|
|
|
http_file(
|
|
|
|
name = "com_github_grpc_ecosystem_grpc_health_probe_binary",
|
|
|
|
sha256 = "bfbe82e34645e91cdf3bacbb0d2dc7786f3c3cc4da6b64a446e5fdfb7bb0429f",
|
|
|
|
downloaded_file_path = "grpc-health-probe",
|
|
|
|
urls = [
|
|
|
|
"https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.3.1/grpc_health_probe-linux-amd64",
|
|
|
|
],
|
|
|
|
executable = True,
|
|
|
|
)
|
2020-01-20 16:54:02 +03:00
|
|
|
|
2020-05-05 20:35:30 +03:00
|
|
|
if "daml-cheat-sheet" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "daml-cheat-sheet",
|
|
|
|
strip_prefix = "daml-cheat-sheet-{}".format(daml_cheat_sheet_version),
|
|
|
|
urls = ["https://github.com/digital-asset/daml-cheat-sheet/archive/{}.tar.gz".format(daml_cheat_sheet_version)],
|
|
|
|
sha256 = daml_cheat_sheet_sha256,
|
|
|
|
build_file_content = """
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
genrule(
|
|
|
|
name = "site",
|
|
|
|
srcs = ["_config.yml"] + glob(["**/*"],
|
|
|
|
exclude = ["_config.yml", "LICENSE", "WORKSPACE", "BUILD.bazel", "README.md"]),
|
|
|
|
outs = ["cheat-sheet.tar.gz"],
|
|
|
|
tools = ["@jekyll_nix//:bin/jekyll"],
|
|
|
|
cmd = '''
|
|
|
|
DIR=$$(dirname $(execpath _config.yml))
|
|
|
|
$(execpath @jekyll_nix//:bin/jekyll) build -s $$DIR
|
2021-02-11 12:08:47 +03:00
|
|
|
tar hc _site \\\\
|
|
|
|
--owner=1000 \\\\
|
|
|
|
--group=1000 \\\\
|
|
|
|
--mtime=2000-01-01\\\\ 00:00Z \\\\
|
|
|
|
--no-acls \\\\
|
|
|
|
--no-xattrs \\\\
|
|
|
|
--no-selinux \\\\
|
|
|
|
--sort=name \\\\
|
2020-05-05 20:35:30 +03:00
|
|
|
| gzip -n > $(OUTS)
|
|
|
|
''',
|
|
|
|
)
|
|
|
|
""",
|
|
|
|
)
|
2021-04-15 20:29:41 +03:00
|
|
|
|
|
|
|
if "canton" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "canton",
|
|
|
|
build_file_content = """
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
java_import(
|
|
|
|
name = "lib",
|
|
|
|
jars = glob(["lib/**/*.jar"]),
|
|
|
|
)
|
|
|
|
""",
|
2022-02-25 12:26:45 +03:00
|
|
|
sha256 = "5b77835398b5e3629f51bc97ad26f3ee01c54622311055954e9c5236d718c1b5",
|
2021-11-04 16:10:48 +03:00
|
|
|
strip_prefix = "canton-community-1.0.0-SNAPSHOT",
|
2022-02-25 12:26:45 +03:00
|
|
|
urls = ["https://www.canton.io/releases/canton-community-20220224.tar.gz"],
|
2021-04-15 20:29:41 +03:00
|
|
|
)
|
2022-02-22 17:30:15 +03:00
|
|
|
|
|
|
|
if "freefont" not in native.existing_rules():
|
|
|
|
http_archive(
|
|
|
|
name = "freefont",
|
|
|
|
build_file_content = """
|
|
|
|
filegroup(
|
|
|
|
name = "fonts",
|
|
|
|
srcs = glob(["**/*.otf"]),
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)""",
|
|
|
|
sha256 = "3a6c51868c71b006c33c4bcde63d90927e6fcca8f51c965b8ad62d021614a860",
|
|
|
|
strip_prefix = "freefont-20120503",
|
|
|
|
urls = ["http://ftp.gnu.org/gnu/freefont/freefont-otf-20120503.tar.gz"],
|
|
|
|
)
|