Skip to content

Commit fcc4d39

Browse files
authored
Merge pull request #2288 from iteratee/kb/cabal-local-archive
cabal: Honor LOCALE_ARCHIVE settings when building cabal targets
2 parents 88d2721 + 6dd476b commit fcc4d39

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

haskell/cabal.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ def _prepare_cabal_inputs(
387387
if extra_ldflags_file:
388388
input_files.append(extra_ldflags_file)
389389

390+
if hs.toolchain.locale_archive:
391+
input_files.append(hs.toolchain.locale_archive)
392+
390393
inputs = depset(
391394
input_files,
392395
transitive = [

haskell/private/cabal_wrapper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ def canonicalize_path(path):
100100
os.environ["RULES_HASKELL_GHC_PKG_PATH"] = canonicalize_path(os.getenv("RULES_HASKELL_GHC_PKG_PATH", ""))
101101
os.environ["RULES_HASKELL_LIBDIR_PATH"] = canonicalize_path(os.getenv("RULES_HASKELL_LIBDIR_PATH", ""))
102102
os.environ["RULES_HASKELL_DOCDIR_PATH"] = canonicalize_path(os.getenv("RULES_HASKELL_DOCDIR_PATH", ""))
103+
if "LOCALE_ARCHIVE" in os.environ:
104+
os.environ["LOCALE_ARCHIVE"] = canonicalize_path(os.getenv("LOCALE_ARCHIVE"))
103105

104106
component = json_args["component"]
105107
name = json_args["pkg_name"]

0 commit comments

Comments
 (0)