A tool to help with fetching Cabal packages from Hackage and importing them as packages into cabal2bazel.
Usage: cabal2bazel --fetch
Examples: cabal2bazel --fetch binary cabal2bazel --fetch binary-0.5.0.2 cabal2bazel --recursive --fetch lens
The process for installing third-party Haskell packages is specified at: https://opensource.google.com/docs/thirdparty/haskell/ cabal2bazel does not (yet) capture all the subtleties of this process, and is no substitute for code review. But it will automate the bulk of chores, including:
cabal2bazel attempts to map the dependencies of a Cabal library or executable to the 'deps' attribute of the resulting Bazel target.
Things that still need manual attention include:
NOTE: You will need an appropriate version of 'cabal' to be available on your path; cabal2bazel uses it for downloading and unpacking packages.
NOTE: Sometimes it is necessary to edit the cabal file and re-run cabal2bazel. In such cases rerun cabal2bazel as follows to resume installation:
cabal2bazel --wire-up
Example: cabal2bazel --wire-up //third_party/haskell/binary/v0_5_0_2
2 commits
2 commits
Starlark
55.4%
Haskell
43.8%
A tool to help with fetching Cabal packages from Hackage and importing them as packages into cabal2bazel.
Usage: cabal2bazel --fetch
Examples: cabal2bazel --fetch binary cabal2bazel --fetch binary-0.5.0.2 cabal2bazel --recursive --fetch lens
The process for installing third-party Haskell packages is specified at: https://opensource.google.com/docs/thirdparty/haskell/ cabal2bazel does not (yet) capture all the subtleties of this process, and is no substitute for code review. But it will automate the bulk of chores, including:
cabal2bazel attempts to map the dependencies of a Cabal library or executable to the 'deps' attribute of the resulting Bazel target.
Things that still need manual attention include:
NOTE: You will need an appropriate version of 'cabal' to be available on your path; cabal2bazel uses it for downloading and unpacking packages.
NOTE: Sometimes it is necessary to edit the cabal file and re-run cabal2bazel. In such cases rerun cabal2bazel as follows to resume installation:
cabal2bazel --wire-up
Example: cabal2bazel --wire-up //third_party/haskell/binary/v0_5_0_2
2 commits
2 commits
Starlark
55.4%
Haskell
43.8%