Package Details: nodejs-neovim 5.4.0-1

Git Clone URL: https://aur.archlinux.org/nodejs-neovim.git (read-only, click to copy)
Package Base: nodejs-neovim
Description: Nvim Node.js client and plugin host
Upstream URL: https://github.com/neovim/node-client
Licenses: MIT
Submitter: tjquillan
Maintainer: iAndrewT
Last Packager: iAndrewT
Votes: 20
Popularity: 0.077265
First Submitted: 2018-05-27 16:42 (UTC)
Last Updated: 2025-09-07 00:14 (UTC)

Latest Comments

Yonsy commented on 2025-09-06 23:35 (UTC)

outdated, updated PKGBUILD for 5.4.0

pkgname=nodejs-neovim
_npmname=neovim
pkgver=5.4.0
pkgrel=1
pkgdesc="Nvim Node.js client and plugin host"
arch=("any")
url="https://github.com/neovim/node-client"
license=("MIT")
depends=("nodejs")
makedepends=("npm" "jq")
optdepends=()
source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
sha256sums=('0f28cc0f83a9ab714627398fca7164614348c3aa53cdf57f1e79fbfeda3418a8')
noextract=("$_npmname-$pkgver.tgz")

package() {
    npm install -g --cache "${srcdir}/npm-cache" --prefix "$pkgdir/usr" "$srcdir/$_npmname-$pkgver.tgz"

    # 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}"

    # Remove references to $pkgdir
    find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d"

    # Remove references to $srcdir
    local tmppackage="$(mktemp)"
    local pkgjson="$pkgdir/usr/lib/node_modules/$_npmname/package.json"
    jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
    mv "$tmppackage" "$pkgjson"
    chmod 644 "$pkgjson"
}

Yonsy commented on 2025-04-03 22:45 (UTC)

updated PKGBUILD for 5.3.0

pkgname=nodejs-neovim
_npmname=neovim
pkgver=5.3.0
pkgrel=1
pkgdesc="Nvim Node.js client and plugin host"
arch=("any")
url="https://github.com/neovim/node-client"
license=("MIT")
depends=("nodejs")
makedepends=("npm" "jq")
optdepends=()
source=("https://registry.npmjs.org/$_npmname/-/$_npmname-$pkgver.tgz")
sha256sums=('fe840cf26b904cb98830fa5723c62b9e04c120a04a8141784377ceecdd5f9661')
noextract=("$_npmname-$pkgver.tgz")

package() {
npm install -g --cache "${srcdir}/npm-cache" --prefix "$pkgdir/usr" "$srcdir/$_npmname-$pkgver.tgz"

# 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}"

# Remove references to $pkgdir
find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d"

# Remove references to $srcdir
local tmppackage="$(mktemp)"
local pkgjson="$pkgdir/usr/lib/node_modules/$_npmname/package.json"
jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
mv "$tmppackage" "$pkgjson"
chmod 644 "$pkgjson"
}

ouuan commented on 2021-06-19 12:57 (UTC)

Please remove --user root and add chown -R root:root "${pkgdir}" instead. Since npm 7, the --user option is no longer available. --user root not only doesn't fix the permission problem, but also installs the package named "root", which conflicts with other packages that also have the --user root option.