_realname=gemini-cli
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.9.0
pkgrel=1
pkgdesc="An open-source AI agent that brings the power of Gemini directly into your terminal. (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/google-gemini/gemini-cli"
msys2_references=(
  'archlinux: gemini-cli'
  'aur: gemini-cli'
  'purl: pkg:npm/@google/gemini-cli'
)
license=('Apache-2.0')
depends=(${MINGW_PACKAGE_PREFIX}-nodejs)
source=("https://registry.npmjs.org/@google/$_realname/-/$_realname-$pkgver.tgz")
sha256sums=('75a632e7501a7450a2784eaef9afb22bb0d3e1960a38cd61a33fdb56f9c44399')
noextract=("${_realname}-${pkgver}.tgz")

package() {
  npm install -g \
    --cache npm-cache \
    --prefix "${pkgdir}${MINGW_PREFIX}" \
    "${_realname}-${pkgver}.tgz"
}
