# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.su>

_realname=pyright
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.1.406
pkgrel=1
pkgdesc='Static Type Checker for Python (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://microsoft.github.io/pyright'
msys2_repository_url='https://github.com/microsoft/pyright'
msys2_references=(
  'archlinux: pyright'
  'purl: pkg:npm/pyright'
)
license=('spdx:MIT')
depends=("${MINGW_PACKAGE_PREFIX}-nodejs")
source=("https://registry.npmjs.org/${_realname}/-/${_realname}-${pkgver}.tgz")
sha256sums=('e3387caa16d30fcc90a1495caa10eb1bae47413cfe5391f0378bbdb6c76c1635')
noextract=("${_realname}-${pkgver}.tgz")

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