diff --git a/.bazelversion b/.bazelversion index 19b860c18..f22d756da 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.4.0 +6.5.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index d9dbdda4f..bc612e838 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). ### Changed * Use ghc 9.4.6 by default +* Use Bazel 6.5.0 by default (See https://github.com/tweag/rules_haskell/pull/2117) ## [0.19] 2024-02-5 [0.19]: https://github.com/tweag/rules_haskell/compare/v0.18...v0.19 -### Highlights +### Highlights * Fix toolchain libraries creation when using `ghcWithPackages` (https://github.com/tweag/rules_haskell/pull/2098) @@ -21,7 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). * Ghc 9.6.4 (https://github.com/tweag/rules_haskell/pull/2108) -### Changed +### Changed * Upgrade `rules_sh` to `0.4.0` (https://github.com/tweag/rules_haskell/pull/2103) diff --git a/haskell/private/versions.bzl b/haskell/private/versions.bzl index cd43259b7..54f3f5393 100644 --- a/haskell/private/versions.bzl +++ b/haskell/private/versions.bzl @@ -16,7 +16,7 @@ SUPPORTED_BAZEL_VERSIONS = [ "6.0.0", "6.3.2", - "6.4.0", + "6.5.0", ] SUPPORTED_NIXPKGS_BAZEL_PACKAGES = [ diff --git a/nixpkgs/nixos-unstable.nix b/nixpkgs/nixos-unstable.nix new file mode 100644 index 000000000..4b3e23af6 --- /dev/null +++ b/nixpkgs/nixos-unstable.nix @@ -0,0 +1,10 @@ +{ ... }@args: +let + # 2024-04-27 + sha256 = "sha256:1iy5vigbw2dx7rhzmsszc7d87sw545f0vw4kcwxk3mazxg9qrzgl"; + rev = "2b1f64b358f2cab62617f26b3870fd0ee375d848"; +in +import (fetchTarball { + inherit sha256; + url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz"; +}) args diff --git a/rules_haskell_tests/MODULE.bazel b/rules_haskell_tests/MODULE.bazel index 6167a00b9..22fd99523 100644 --- a/rules_haskell_tests/MODULE.bazel +++ b/rules_haskell_tests/MODULE.bazel @@ -115,7 +115,7 @@ use_repo( "bazel_6", "build_bazel_bazel_6_0_0", "build_bazel_bazel_6_3_2", - "build_bazel_bazel_6_4_0", + "build_bazel_bazel_6_5_0", "glibc_locales", "linux_amd64_asterius-toolchain", "nixpkgs_config_cc", @@ -126,6 +126,7 @@ use_repo( "nixpkgs_go_sdk_toolchains", "nixpkgs_lz4", "nixpkgs_python_toolchain", + "nixpkgs_unstable", "toolchains_libraries", "zlib.dev", ) diff --git a/rules_haskell_tests/non_module_deps_1.bzl b/rules_haskell_tests/non_module_deps_1.bzl index 43e63ee3e..8ae5158fb 100644 --- a/rules_haskell_tests/non_module_deps_1.bzl +++ b/rules_haskell_tests/non_module_deps_1.bzl @@ -58,6 +58,12 @@ def repositories(*, bzlmod): nix_file = "//nixpkgs:default.nix", ) + # TODO switch back to nixpkgs_default once bazel_* matches the version in .bazelversion + nixpkgs_local_repository( + name = "nixpkgs_unstable", + nix_file = "//nixpkgs:nixos-unstable.nix", + ) + nixpkgs_package( name = "glibc_locales", attribute_path = "glibcLocales", diff --git a/rules_haskell_tests/tests/integration_testing/dependencies.bzl b/rules_haskell_tests/tests/integration_testing/dependencies.bzl index c94bbd7f3..b4b18af0b 100644 --- a/rules_haskell_tests/tests/integration_testing/dependencies.bzl +++ b/rules_haskell_tests/tests/integration_testing/dependencies.bzl @@ -11,7 +11,8 @@ def integration_testing_bazel_binaries(): for package in SUPPORTED_NIXPKGS_BAZEL_PACKAGES: nixpkgs_package( name = package, - repository = "@nixpkgs_default", + # TODO switch back to nixpkgs_default once bazel_* matches the version in .bazelversion + repository = "@nixpkgs_unstable", build_file_content = """\ filegroup( name = "bazel_bin", diff --git a/shell.nix b/shell.nix index 38a21a923..f6db1c936 100644 --- a/shell.nix +++ b/shell.nix @@ -3,6 +3,8 @@ with pkgs; let + nixos-unstable = import ./nixpkgs/nixos-unstable.nix { }; + macOS-security = # make `/usr/bin/security` available in `PATH`, which is needed for stack # on darwin which calls this binary to find certificates @@ -42,7 +44,8 @@ mkShell { ++ lib.optionals docTools [ graphviz python39Packages.sphinx zip unzip ] ++ lib.optional stdenv.isDarwin macOS-security; - packages = [ bazel_6 ]; + # TODO switch back to default nixpkgs once bazel_* matches the version in .bazelversion + packages = [ nixos-unstable.bazel_6 ]; shellHook = '' # Add nix config flags to .bazelrc.local.