Skip to content

Commit 7537a28

Browse files
committed
cabal: Add necessary aliases for vendored packages with executables
This allows vendoring of packages with necessary tools from a stack snapshot. For example, if the cabal file for `cpphs` hasn't yet been bumped on hackage with increased bounds for the newest ghc.
1 parent f28afba commit 7537a28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

haskell/cabal.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,12 @@ load("@rules_haskell//haskell:defs.bzl", "haskell_library", "haskell_toolchain_l
20282028
alias(name = "{name}", actual = "{actual}", visibility = {visibility})
20292029
""".format(name = name, actual = vendored_packages[name], visibility = visibility),
20302030
)
2031+
for exe in all_components[name].exe:
2032+
build_file_builder.append(
2033+
"""
2034+
alias(name = "_{name}_exe_{exe}", actual = "{actual}_exe_{exe}", visibility = {visibility})
2035+
""".format(name = name, exe = exe, actual = vendored_packages[name], visibility = visibility)
2036+
)
20312037

20322038
elif spec["location"]["type"] == "core":
20332039
build_file_builder.append(

0 commit comments

Comments
 (0)