summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e3438c3e56d69b28e41b34e18eae1f999b042b4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pkgname=graphql-lsp
pkgver=3.1.3
pkgrel=1
pkgdesc='graphql language server cli'
arch=('x86_64')
url="https://github.com/graphql/graphiql"
makedepends=('npm')
source=("$url/archive/refs/tags/graphql-language-service@$pkgver.tar.gz")
sha256sums=('0cdf7da4e2c161bb5a249748d4e60482453abff4d12f164d1fa3e1b6ab1172a4')

package() {
  npm install -g --prefix "${pkgdir}/usr" "${srcdir}/graphiql-graphql-language-service-${pkgver}/packages/graphql-language-service-cli"

  # Non-deterministic race in npm gives 777 permissions to random directories.
  # See https://github.com/npm/cli/issues/1103 for details.
  find "${pkgdir}/usr" -type d -exec chmod 755 {} +

  # npm gives ownership of ALL FILES to build user
  # https://bugs.archlinux.org/task/63396
  chown -R root:root "${pkgdir}"
}