I found out the other day about pass-cli
https://github.com/arimxyer/pass-cli
Let's just say, when it comes to some other distros and packing and compiling source I do ok, but with ebuild I'm lost.
SO I worked with AI to whip this up, but it's my understanding this does not coincide to Gentoo Standards, like this could not be redistrubted with Gentoo or for an overlay.
The problem I was runing into, trying to grab the source it needed, and then having to restrict it.
If anyone can help convert this to make it more official, or at least make sure this works in a correct manner as a local ebuild, I'd appreciate any help.
Also if there is anyone out there that loves password managers, and thinks pass-cli can be either added to Gentoo or an overlay that would be great.
THANKS
Code: Select all
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="A secure, cross-platform password and API key manager"
HOMEPAGE="https://github.com/arimxyer/pass-cli"
SRC_URI="https://github.com/arimxyer/pass-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
# Required for the 'go mod download' step in src_unpack
PROPERTIES="test_network"
RESTRICT="network-sandbox"
RDEPEND="app-admin/pass"
DEPEND="${RDEPEND}"
BDEPEND=">=dev-lang/go-1.20"
S="${WORKDIR}/${P}"
src_unpack() {
default
cd "${S}" || die
export GOPATH="${WORKDIR}/gopath"
einfo "Fetching Go dependencies..."
go mod download || die "Failed to fetch Go modules"
}
src_compile() {
export GOPATH="${WORKDIR}/gopath"
# Cleaned up the flags into a single string to avoid syntax errors
local myldflags="-compressdwarf=false -linkmode external -X main.version=${PV} -X pass-cli/cmd.version=${PV} -X github.com/arimxyer/pass-cli/cmd.version=${PV}"
einfo "Compiling pass-cli version ${PV}..."
go build -ldflags "${myldflags}" -o pass-cli . || die "Go build failed"
}
src_install() {
dobin pass-cli
dodoc README.md
# Optional: install the license file to the standard location
insinto /usr/share/licenses/${PN}
doins LICENSE


