# Pinned to the revision Mathlib v4.35.0 locks in its lake-manifest.json; a dependent's # `lake build` accepts an installed package only at that exact commit, so this # moves together with lean4-mathlib and lean4. %global commit 66e469188fe07963e5cf666c7d4433f45b8131c5 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20261012 %global lean_version 4.35.0 %global lakename batteries Name: lean4-batteries Version: 0^20261012git66e4691 Release: 1%{?dist} Summary: Batteries: the extended standard library for Lean 4 License: Apache-2.0 URL: https://github.com/leanprover-community/batteries Source0: %{url}/archive/%{commit}/batteries-%{commit}.tar.gz # `git cat-file commit %%{commit}`: %%lean4_git_init rebuilds the checkout # Lake expects from the tarball (see macros.lean4). Source1: batteries-%{commit}.commit BuildArch: noarch BuildRequires: lean4 = %{lean_version} BuildRequires: lean4-rpm-macros BuildRequires: git-core Requires: lean4 = %{lean_version} # what a dependent's spec pins: the Lake package name at its exact revision Provides: lean4-package(%{lakename}) = %{commit} %description Batteries (formerly Std4) collects data structures, tactics, lemmas and library extensions for Lean 4 that are general enough to live outside Mathlib. Only the library is built: the runLinter executable in its default targets is a Mathlib CI tool. %prep %autosetup -n batteries-%{commit} %lean4_git_init %{SOURCE1} %{url} %build %lean4_build Batteries %check # the installed oleans load and elaborate against this toolchain cat > %{_builddir}/check-%{lakename}.lean <<'EOF' import Batteries #check @Batteries.BinaryHeap.insert EOF lake env lean %{_builddir}/check-%{lakename}.lean %install %lean4_install %{lakename} %files %license LICENSE %doc README.md %{_lean4_pkgdir}/%{lakename}/ %changelog * Mon Nov 02 2026 Morgan Hough - 0^20261012git66e4691-1 - Initial package: the revision Mathlib v4.35.0 pins