-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With `haskell_cabal_library` (added in #882), we have the ability to make one-shot calls to Cabal, assuming, 1. that the sdist for the Cabal package has been fetched and unpacked, and 2. that dependencies have been declared correctly. Declaring these dependencies by hand for all packages on Hackage is a fool's errand. This commit uses Stack to, 1. resolve package names to package versions using the given snapshot, 2. fetch the sdist and unpack it, 3. find out the dependency graph and generate a `BUILD` file encoding it. Stack only outputs dependency information in GraphViz format. So have to parse that. This assumes Stack is in the `PATH` (hence build is non-hermetic). But it's pretty unreasonable to build our own Stack inside a workspace rule (Bazel's build engine doesn't work there). The best we can do is download prebuilt binaries, which we can do in the future (after figuring out how to seamlessly work on NixOS). Closes #874.
- Loading branch information
Showing
2 changed files
with
238 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters