Managing package dependencies with Bazel

Thank you, @bernhard, this works.

For the records, this is my BUILD file for A:

genrule(
    name = "A",
    srcs = glob(["src/**"]) + ["daml.yaml", "//path/to/B:B"],
    outs = ["A.dar"],
    cmd = """
        mkdir -p path/to/A/lib
        cp $(location //path/to/B:B) path/to/A/lib
        daml build --project-root path/to/A -o $@
)

and my daml.yaml looks just like what you have quoted.

dependencies:
  - daml-prim
  - daml-stdlib
  - daml-script
  - ./libs/B.dar

Thanks again.
Alex

1 Like