Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d70da96
Update to NixOS-unstable and Bazel 6.3.2
aherrmann Sep 27, 2023
c1a32e6
Enable isolated extensions
aherrmann Sep 27, 2023
e678776
apply bzlmod configuration to common
aherrmann Sep 27, 2023
ebfed29
Implement a simplified form of nix_repo
aherrmann Sep 27, 2023
5891452
Introduce an intermediate module for testing
aherrmann Sep 27, 2023
bbb628f
Add simple nix_pkg extension
aherrmann Sep 28, 2023
ebfef9c
Implement attribute path overriding
aherrmann Sep 28, 2023
5dfbb3c
Add simple file and expr package tags
aherrmann Sep 28, 2023
f3e541e
nixpkgs-simple --> nixpkgs
aherrmann Sep 28, 2023
06fce89
Move package tests to simple extension
aherrmann Sep 28, 2023
73870f9
Add file and expr tags on the simple repo ext
aherrmann Sep 28, 2023
4742fc1
Move the remaining tests to simple extension
aherrmann Sep 28, 2023
277d9be
Remove the empty nix_pkg test set
aherrmann Sep 28, 2023
12a83a2
fix ref to previous loop var
aherrmann Sep 28, 2023
8254285
Remove unused non-simple extensions
aherrmann Sep 28, 2023
2890c06
Remove unused nix_repo|pkg workspace shims
aherrmann Sep 28, 2023
a7343f4
Remove the "non-simple" extensions
aherrmann Sep 28, 2023
f3f83f6
Remove the module_registry support module
aherrmann Sep 28, 2023
712bb96
Remove the "_simple" suffix
aherrmann Sep 28, 2023
e9ee233
Document the module and tag loops
aherrmann Sep 28, 2023
8acd51c
Allow duplicates between default and dev-deps
aherrmann Sep 28, 2023
d9e0b2d
Run tests in and from intermediate module
aherrmann Sep 28, 2023
d01acba
Test isolated extensions in intermediate module
aherrmann Sep 28, 2023
332fbb0
Fix bazelignore
aherrmann Sep 28, 2023
b32d2c1
Update the design document
aherrmann Sep 29, 2023
24bbef8
Allow insecure package Python2
aherrmann Sep 29, 2023
c630600
Bump fixed Nix version
aherrmann Sep 29, 2023
925f8e4
Patch cc-wrapper to replace --tmpdir flag
aherrmann Oct 2, 2023
6222254
Add a comment to cc-wrapper patch
aherrmann Oct 2, 2023
675f059
Share patched cc between go-bzlmod and go-workspace
aherrmann Oct 3, 2023
6cb237b
Remove redundant @nixpkgs
aherrmann Oct 3, 2023
651fe0d
Fall back to regular coreutils on Darwin
aherrmann Oct 3, 2023
488358c
add a comment to the MacOS coreutils workaround
aherrmann Oct 3, 2023
72b4b1d
simplify the may_override check
aherrmann Oct 13, 2023
2cb592c
Update WORKSPACE
aherrmann Oct 16, 2023
a86be3c
Merge branch 'master' into bzlmod-isolate
mergify[bot] Oct 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .bazelrc.common
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
build --host_platform=@rules_nixpkgs_core//platforms:host

build:bzlmod --enable_bzlmod
build:bzlmod --registry=https://bcr.bazel.build
common:bzlmod --enable_bzlmod
common:bzlmod --registry=https://bcr.bazel.build
common:bzlmod --experimental_isolated_extension_usages

test --test_output=errors

Expand Down
1 change: 1 addition & 0 deletions .github/build-and-test
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ if [[ ${BZLMOD_ENABLED-} = true ]]; then
)
declare -ra test_dirs=(
testing/core
testing/core/tests/intermediate_module
testing/go-bzlmod
testing/java
testing/nodejs
Expand Down
16 changes: 6 additions & 10 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,23 @@ docs_dependencies_2()
load(
"//nixpkgs:nixpkgs.bzl",
"nixpkgs_git_repository",
"nixpkgs_local_repository",
"nixpkgs_package",
)

nixpkgs_local_repository(
name = "nixpkgs",
nix_file = "@rules_nixpkgs_core//:nixpkgs.nix",
nix_file_deps = ["@rules_nixpkgs_core//:nixpkgs.json"],
)

nixpkgs_package(
name = "nix_2_7",
attribute_path = "nixVersions.nix_2_7",
name = "nix_2_10",
attribute_path = "nixVersions.nix_2_10",
repositories = {"nixpkgs": "@nixpkgs"},
)

# This is used to run Nix in a sandboxed Bazel test. See the test
# `run-test-invalid-nixpkgs-package`.
nixpkgs_package(
name = "coreutils_static",
attribute_path = "pkgsStatic.coreutils",
# Work around https://github.com/tweag/rules_nixpkgs/issues/424.
# `pkgsStatic.coreutils` stopped working on MacOS 11 with x86_64 as used on GitHub actions CI.
# Fall back to `pkgs.coreutils` on MacOS.
nix_file_content = "let pkgs = import <nixpkgs> { config = {}; overlays = []; }; in if pkgs.stdenv.isDarwin then pkgs.coreutils else pkgs.pkgsStatic.coreutils",
repository = "@nixpkgs",
)

Expand Down
3 changes: 1 addition & 2 deletions core/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ bazel_dep(name = "platforms", version = "0.0.4")
bazel_dep(name = "bazel_skylib", version = "1.0.3")

nix_repo = use_extension("//extensions:repository.bzl", "nix_repo")
use_repo(nix_repo, "nixpkgs_repositories")
nix_repo.override(name = "nixpkgs")
nix_repo.github(
name = "nixpkgs",
tag = "22.11",
sha256 = "ddc3428d9e1a381b7476750ac4dbea7a42885cbbe6e1af44b21d6447c9609a6f",
)
use_repo(nix_repo, "nixpkgs")
Loading