-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5274af
commit f201b29
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Template file for 'pyright' | ||
pkgname=pyright | ||
version=1.1.307 | ||
revision=1 | ||
build_wrksrc="packages/pyright" | ||
hostmakedepends="nodejs python3" | ||
depends="nodejs" | ||
short_desc="Static type checker and language server for Python" | ||
maintainer="classabbyamp <void@placeviolette.net>" | ||
license="MIT" | ||
homepage="https://microsoft.github.io/pyright" | ||
changelog="https://github.com/microsoft/pyright/releases" | ||
distfiles="https://github.com/microsoft/pyright/archive/refs/tags/${version}.tar.gz" | ||
checksum=434343c13bd470078c0184d7ac6383b5c0e43fabf79efaaef8e501d2a39933e3 | ||
|
||
do_configure() { | ||
cd "$wrksrc" | ||
npm ci | ||
} | ||
|
||
do_build() { | ||
npm run build | ||
} | ||
|
||
do_install() { | ||
local _targetdir="/usr/lib/pyright" | ||
vmkdir "$_targetdir" | ||
vinstall index.js 755 "$_targetdir" | ||
vinstall langserver.index.js 755 "$_targetdir" | ||
vinstall package.json 644 "$_targetdir" | ||
vcopy dist "$_targetdir" | ||
|
||
vmkdir /usr/bin | ||
ln -s "$_targetdir/index.js" "${DESTDIR}/usr/bin/pyright" | ||
ln -s "$_targetdir/langserver.index.js" "${DESTDIR}/usr/bin/pyright-langserver" | ||
|
||
vlicense "$wrksrc/LICENSE.txt" | ||
} |