Skip to content

Commit 72e27a7

Browse files
committed
Use bazel from nixos-unstable
1 parent 55a484a commit 72e27a7

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

nixpkgs/nixos-unstable.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{ ... }@args:
2+
let
3+
# 2024-04-27
4+
sha256 = "sha256:1iy5vigbw2dx7rhzmsszc7d87sw545f0vw4kcwxk3mazxg9qrzgl";
5+
rev = "2b1f64b358f2cab62617f26b3870fd0ee375d848";
6+
in
7+
import (fetchTarball {
8+
inherit sha256;
9+
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
10+
}) args

rules_haskell_tests/MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ use_repo(
126126
"nixpkgs_go_sdk_toolchains",
127127
"nixpkgs_lz4",
128128
"nixpkgs_python_toolchain",
129+
"nixpkgs_unstable",
129130
"toolchains_libraries",
130131
"zlib.dev",
131132
)

rules_haskell_tests/non_module_deps_1.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ def repositories(*, bzlmod):
5858
nix_file = "//nixpkgs:default.nix",
5959
)
6060

61+
# TODO switch back to nixpkgs_default once bazel_* matches the version in .bazelversion
62+
nixpkgs_local_repository(
63+
name = "nixpkgs_unstable",
64+
nix_file = "//nixpkgs:nixos-unstable.nix",
65+
)
66+
6167
nixpkgs_package(
6268
name = "glibc_locales",
6369
attribute_path = "glibcLocales",

rules_haskell_tests/tests/integration_testing/dependencies.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def integration_testing_bazel_binaries():
1111
for package in SUPPORTED_NIXPKGS_BAZEL_PACKAGES:
1212
nixpkgs_package(
1313
name = package,
14-
repository = "@nixpkgs_default",
14+
# TODO switch back to nixpkgs_default once bazel_* matches the version in .bazelversion
15+
repository = "@nixpkgs_unstable",
1516
build_file_content = """\
1617
filegroup(
1718
name = "bazel_bin",

shell.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
with pkgs;
44

55
let
6+
nixos-unstable = import ./nixpkgs/nixos-unstable.nix { };
7+
68
macOS-security =
79
# make `/usr/bin/security` available in `PATH`, which is needed for stack
810
# on darwin which calls this binary to find certificates
@@ -42,7 +44,8 @@ mkShell {
4244
++ lib.optionals docTools [ graphviz python39Packages.sphinx zip unzip ]
4345
++ lib.optional stdenv.isDarwin macOS-security;
4446

45-
packages = [ bazel_6 ];
47+
# TODO switch back to default nixpkgs once bazel_* matches the version in .bazelversion
48+
packages = [ nixos-unstable.bazel_6 ];
4649

4750
shellHook = ''
4851
# Add nix config flags to .bazelrc.local.

0 commit comments

Comments
 (0)