mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 17:28:46 +03:00
1bc119e99a
* Update rules_haskell - Fixes the issue where a `sh_test` wrapping a `haskell_binary` couldn't add runfiles as is the case with other Bazel rules. CHANGELOG_BEGIN CHANGELOG_END * Save the runfiles environment at start-up To work around the fact that `withProgName` overwrites `argv[0]`. See https://gitlab.haskell.org/ghc/ghc/-/issues/18418. * damlc_compile_test include damlc runfiles Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
38 lines
943 B
Python
38 lines
943 B
Python
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load("//bazel_tools:haskell.bzl", "da_haskell_library", "da_haskell_test")
|
|
|
|
da_haskell_library(
|
|
name = "bazel-runfiles",
|
|
srcs = glob(["src/DA/Bazel/Runfiles.hs"]),
|
|
hackage_deps = [
|
|
"base",
|
|
"directory",
|
|
"filepath",
|
|
"safe-exceptions",
|
|
"split",
|
|
"transformers",
|
|
],
|
|
src_strip_prefix = "src",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"@rules_haskell//tools/runfiles",
|
|
],
|
|
)
|
|
|
|
da_haskell_test(
|
|
name = "bazel-runfiles-test",
|
|
srcs = glob(["test/DA/Bazel/RunfilesTest.hs"]),
|
|
data = glob(["test/resources/**"]),
|
|
hackage_deps = [
|
|
"base",
|
|
"directory",
|
|
"filepath",
|
|
"tasty",
|
|
"tasty-hunit",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [":bazel-runfiles"],
|
|
)
|