Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

66.3. yarn-4.18.1

JavaScript package manager, the Berry line

4.18.1-2 · BSD-2-Clause · 0.1 SBU · 3.6 MiB, 5 files · 40_lang, 46 of 186 · ports/core/lang/yarn

Homepage: https://yarnpkg.com/

Depends on: nodejs.

Required by: no port names it.

Sources: yarn-4.18.1.tgz (1.3 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/40_lang/phase.env && kpkg install yarn'

build.sh:

install -Dm755 bin/yarn.js "$PKG/usr/lib/node_modules/yarn/bin/yarn.js"
install -Dm644 package.json "$PKG/usr/lib/node_modules/yarn/package.json"

install -d "$PKG/usr/bin"
cat > "$PKG/usr/bin/yarn" <<'KDOS_SH'
#!/bin/sh
export YARN_ENABLE_TELEMETRY="${YARN_ENABLE_TELEMETRY:-0}"
exec node /usr/lib/node_modules/yarn/bin/yarn.js "$@"
KDOS_SH
chmod 755 "$PKG/usr/bin/yarn"
ln -s yarn "$PKG/usr/bin/yarnpkg"
install -Dm644 "$PORT_SRC/LICENSE.md" "$PKG/usr/share/licenses/$name/LICENSE.md"

Programs: yarn, yarnpkg.

Directories: /usr/lib/node_modules/yarn, /usr/share/licenses/yarn.