diff --git a/MODULE.bazel b/MODULE.bazel index fab9f45..c6c65d7 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -3,7 +3,7 @@ module( version = "0.0.0", ) -bazel_dep(name = "rules_haskell") +bazel_dep(name = "rules_haskell", version = "0.18") stack_snapshot = use_extension( "@rules_haskell//extensions:stack_snapshot.bzl", diff --git a/WORKSPACE b/WORKSPACE index fea4c94..8ac8697 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -8,9 +8,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_haskell", - sha256 = "1485a90366039fe8ea5051732dc50827d8c1e9bb6feb2c8bb1ad1fed5344cff0", - strip_prefix = "rules_haskell-155ba21c7d315cc421ee3f17a1c09b758cc7279d", - urls = ["https://github.com/tweag/rules_haskell/archive/155ba21c7d315cc421ee3f17a1c09b758cc7279d.tar.gz"], + sha256 = "d1f0e1bd4f1d5e248b2882bfdc7c31a146112f9d85b9d2f0ef77e78d02ecba45", + strip_prefix = "rules_haskell-0.18", + urls = ["https://github.com/tweag/rules_haskell/releases/download/v0.18/rules_haskell-0.18.tar.gz"], ) load("@rules_haskell//haskell:repositories.bzl", "rules_haskell_dependencies") diff --git a/example/MODULE.bazel b/example/MODULE.bazel index cdface0..e03998c 100644 --- a/example/MODULE.bazel +++ b/example/MODULE.bazel @@ -3,7 +3,7 @@ module(name = "gazelle_cabal_example") bazel_dep(name = "gazelle_cabal", repo_name = "io_tweag_gazelle_cabal") local_path_override(module_name = "gazelle_cabal", path = "..") -bazel_dep(name = "rules_haskell") +bazel_dep(name = "rules_haskell", version = "0.18") bazel_dep(name = "rules_haskell_nix") bazel_dep(name = "rules_go", version = "0.41.0", repo_name = "io_bazel_rules_go") bazel_dep(name = "gazelle", version = "0.33.0", repo_name = "bazel_gazelle") @@ -65,20 +65,15 @@ register_toolchains( "@all_posix_toolchains//:all", ) -# TODO Remove once rules_haskell is in the BCR. -RULES_HASKELL_REV = "25831a7a3313fbadb6dbd166fca20ced6c38a1d1" -RULES_HASKELL_INTEGRITY = "sha384-U+jg9U1fF4ibW5TDzj6UruKqD9ELsUA60QEO1MMTxbgG1BJnh0+JbQd3BcTHroSn" -archive_override( - module_name = "rules_haskell", - urls = ["https://github.com/tweag/rules_haskell/archive/%s.tar.gz" % RULES_HASKELL_REV], - strip_prefix = "rules_haskell-%s" % RULES_HASKELL_REV, - integrity = RULES_HASKELL_INTEGRITY, -) +# TODO Remove once rules_haskell_nix is in the BCR. +RULES_HASKELL_REV = "0.18" +RULES_HASKELL_INTEGRITY = "sha256-0fDhvU8dXiSLKIK/3HwxoUYRL52FudLw73fnjQLsukU=" + archive_override( module_name = "rules_haskell_nix", - urls = ["https://github.com/tweag/rules_haskell/archive/%s.tar.gz" % RULES_HASKELL_REV], - strip_prefix = "rules_haskell-%s/rules_haskell_nix" % RULES_HASKELL_REV, integrity = RULES_HASKELL_INTEGRITY, + strip_prefix = "rules_haskell-%s/rules_haskell_nix" % RULES_HASKELL_REV, + urls = ["https://github.com/tweag/rules_haskell/releases/download/v{REV}/rules_haskell-{REV}.tar.gz".format(REV = RULES_HASKELL_REV)], ) # Needed for custom toolchain definitions in non_module_deps. diff --git a/example/WORKSPACE b/example/WORKSPACE index a189110..1c24ab8 100644 --- a/example/WORKSPACE +++ b/example/WORKSPACE @@ -13,9 +13,9 @@ local_repository( http_archive( name = "rules_haskell", - sha256 = "1485a90366039fe8ea5051732dc50827d8c1e9bb6feb2c8bb1ad1fed5344cff0", - strip_prefix = "rules_haskell-155ba21c7d315cc421ee3f17a1c09b758cc7279d", - urls = ["https://github.com/tweag/rules_haskell/archive/155ba21c7d315cc421ee3f17a1c09b758cc7279d.tar.gz"], + sha256 = "d1f0e1bd4f1d5e248b2882bfdc7c31a146112f9d85b9d2f0ef77e78d02ecba45", + strip_prefix = "rules_haskell-0.18", + urls = ["https://github.com/tweag/rules_haskell/releases/download/v0.18/rules_haskell-0.18.tar.gz"], ) load("@rules_haskell//haskell:repositories.bzl", "rules_haskell_dependencies") diff --git a/tests/alternative-deps/WORKSPACE b/tests/alternative-deps/WORKSPACE index 72ad84e..9638052 100644 --- a/tests/alternative-deps/WORKSPACE +++ b/tests/alternative-deps/WORKSPACE @@ -13,9 +13,9 @@ local_repository( http_archive( name = "rules_haskell", - sha256 = "1485a90366039fe8ea5051732dc50827d8c1e9bb6feb2c8bb1ad1fed5344cff0", - strip_prefix = "rules_haskell-155ba21c7d315cc421ee3f17a1c09b758cc7279d", - urls = ["https://github.com/tweag/rules_haskell/archive/155ba21c7d315cc421ee3f17a1c09b758cc7279d.tar.gz"], + sha256 = "d1f0e1bd4f1d5e248b2882bfdc7c31a146112f9d85b9d2f0ef77e78d02ecba45", + strip_prefix = "rules_haskell-0.18", + urls = ["https://github.com/tweag/rules_haskell/releases/download/v0.18/rules_haskell-0.18.tar.gz"], ) load("@rules_haskell//haskell:repositories.bzl", "rules_haskell_dependencies")