Install this version:
emerge -a =dev-util/glab-1.120.0
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-util/glab-1.120.0
Or alternatively:
emerge --autounmask-write -a =dev-util/glab-1.120.0
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 1.120.0 | 8 | ~amd64 | 0 |
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
EGO_PN="gitlab.com/gitlab-org/cli"
COMMIT_ID="78790114c4d7196c97b2b1a1263a0d725835640d"
inherit go-module shell-completion
DESCRIPTION="Gitlab CLI"
HOMEPAGE="https://gitlab.com/gitlab-org/cli"
SRC_URI="https://gitlab.com/gitlab-org/cli/-/releases/v${PV}/downloads/${PN}_${PV}_source.tar.gz -> ${P}.tar.gz"
# Add the manually vendored tarball.
# 1) Create a tar archive optimized to reproduced by other users or devs.
# 2) Compress the archive using XZ limiting decompression memory for
# pretty constraint systems.
# Use something like:
# GOMODCACHE="${PWD}"/go-mod go mod download -modcacherw
# tar cf "${P}-deps.tar" go-mod \
# --mtime="1970-01-01" --sort=name --owner=portage --group=portage
# xz -k -9eT0 --memlimit-decompress=16G "${P}-deps.tar"
SRC_URI+=" https://files.holgersson.xyz/gentoo/distfiles/golang-pkg-deps/${P}-deps.tar.xz"
S="${WORKDIR}/"
LICENSE="Apache-2.0 BSD BSD-2 imagemagick ISC MIT MPL-2.0"
# github.com/golang/freetype@v0.0.0-20170609003504-e2365dfdc4a0
LICENSE+=" || ( FTL GPL-2+ )"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
BDEPEND=">=dev-lang/go-1.27.0"
RESTRICT+=" !test? ( test )"
# The golang compiler already strips.
QA_PRESTRIPPED="/usr/bin/glab"
# Omit files that contain just links to websites here.
DOCS=(
AGENTS.md
CLAUDE.md
CONTRIBUTING.md
README.md
SECURITY.md
)
src_compile() {
# Flags -w, -s: Omit debugging information to reduce binary size,
# see https://golang.org/cmd/link/.
local mygobuildargs=(
-trimpath
-ldflags="-X main.commit=${COMMIT_ID} \
-X main.version=${PV} \
-X main.debugMode=false \
-w -s"
)
ego build "${mygobuildargs[@]}" -o "${PN}" "${EGO_PN}"/cmd/glab
# inspired by dev-vcs/git-lfs ;)
./glab completion --shell bash > "${PN}.bash" || die
./glab completion --shell fish > "${PN}.fish" || die
./glab completion --shell zsh > "${PN}.zsh" || die
}
src_install() {
dobin "${PN}"
einstalldocs
# Install auto-completion scripts generated earlier.
newbashcomp "${PN}.bash" "${PN}"
dofishcomp "${PN}.fish"
newzshcomp "${PN}.zsh" "_${PN}"
}
Manage flags for this package:
euse -i <flag> -p dev-util/glab |
euse -E <flag> -p dev-util/glab |
euse -D <flag> -p dev-util/glab
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | glab-1.120.0-deps.tar.xz | 156783632 bytes | https://files.holgersson.xyz/gentoo/distfiles/golang-pkg-deps/glab-1.120.0-deps.tar.xz |
| DIST | glab-1.120.0.tar.gz | 32954132 bytes | https://gitlab.com/gitlab-org/cli/-/releases/v1.120.0/downloads/glab_1.120.0_source.tar.gz |