Files
zeekay 7844a60aff refactor(pack): modernize to github.com/hanzoai/pack and remove upstream branding
- Migrate module path to github.com/hanzoai/pack across all Go packages
- Remove legacy upstream docs and competitor brand references
- Modernize LLM.md and mise.toml for pristine Hanzo Pack builder
2026-09-04 00:40:42 -07:00

32 lines
880 B
Go

package cpp
import (
"github.com/hanzoai/pack/core/generate"
"github.com/hanzoai/pack/core/plan"
)
type meson struct{}
func (p *CppProvider) DetectMeson(ctx *generate.GenerateContext) (buildSystem, bool) {
if ctx.App.HasFile("meson.build") {
return &meson{}, true
}
return nil, false
}
func (m *meson) Install(ctx *generate.GenerateContext, mise *generate.MiseStepBuilder) {
mise.Default("meson", "latest")
mise.Default("ninja", "latest")
// python + pipx are needed because of an installation issue with meson; this could be fixed in the future
mise.Default("python", "latest")
mise.Default("pipx", "latest")
mise.UseMiseVersions(ctx, []string{"meson", "ninja"})
}
func (m *meson) Build(build *generate.CommandStepBuilder) {
build.AddCommands([]plan.Command{
plan.NewExecCommand("meson setup /build"),
plan.NewExecCommand("meson compile -C /build"),
})
}