From 1e8e1d71295c42aeaff25bad9c5a3e9caf493e07 Mon Sep 17 00:00:00 2001 From: Ralf Anton Beier Date: Sun, 18 Jan 2026 13:36:23 +0100 Subject: [PATCH] fix: require root module to configure nixpkgs The nix_repo.github() tag can only be used in the root module or an isolated extension. Update MODULE.bazel to not configure nixpkgs itself and document that users must configure it. --- MODULE.bazel | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 64de6c3..04e24ce 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -2,6 +2,8 @@ This module provides Bazel rules for Rocq/Coq theorem proving. Uses nixpkgs for hermetic Coq toolchain installation. + +NOTE: The root module must configure nixpkgs - see README.md """ module( @@ -15,23 +17,9 @@ bazel_dep(name = "bazel_skylib", version = "1.8.2") bazel_dep(name = "platforms", version = "1.0.0") # Nix integration for hermetic Coq/Rocq toolchain +# NOTE: The root module must configure nixpkgs repository bazel_dep(name = "rules_nixpkgs_core", version = "0.13.0") -# Configure nixpkgs repository for Coq/Rocq toolchain -nix_repo = use_extension( - "@rules_nixpkgs_core//extensions:repository.bzl", - "nix_repo", -) -nix_repo.github( - name = "nixpkgs", - org = "NixOS", - repo = "nixpkgs", - # nixos-24.11 stable channel - commit = "d4f247e89f6e10120f911e2e2d2254a050d0f732", - sha256 = "dee2f93be38d1a63ee9b731fa993f0ac2c60c3a62cca32d4cc64c2ed5b8a8e06", -) -use_repo(nix_repo, "nixpkgs") - # Development dependencies bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)