What happens if you are building a library that is published to Hackage?
http_archive(
name = ...,
build_file_content = """
load(
"@org//bazel:defs.bzl",
"pai_haskell_library",
)
pai_haskell_library(
name = ...,
version = ...,
srcs = glob(["src/**/*.hs"]),
stackage_deps = [...],
visibility = ["//visibility:public"]
)
""",
patch_args = ["-p1"],
patches = [
"//dir:git-patch-file",
],
sha256 = "...",
urls = ["https://github.com/org/repo/archive/1.0.0.0.tar.gz"],
)