diff options
Diffstat (limited to 'app-shells/direnv')
-rw-r--r-- | app-shells/direnv/direnv-2.34.0-r0.ebuild | 48 | ||||
-rw-r--r-- | app-shells/direnv/direnv-2.34.0.ebuild | 22 |
2 files changed, 48 insertions, 22 deletions
diff --git a/app-shells/direnv/direnv-2.34.0-r0.ebuild b/app-shells/direnv/direnv-2.34.0-r0.ebuild new file mode 100644 index 0000000..e34d8f7 --- /dev/null +++ b/app-shells/direnv/direnv-2.34.0-r0.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit go-module greadme + +DESCRIPTION="Environment variable manager for shell" +HOMEPAGE="https://github.com/direnv/direnv" +SRC_URI="https://github.com/direnv/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://share.terinstock.com/${P}-vendor.tar.xz" + +LICENSE="MIT" +LICENSE+=" BSD" +SLOT="0" +KEYWORDS="~amd64" +RESTRICT="test" # fails + +src_prepare() { + default + sed -i -e "/selfPath, err/cselfPath := \"${EPREFIX}/usr/bin/direnv\"" internal/cmd/cmd_hook.go || die +} + +src_compile() { + emake all + + mkdir shell-init || die + for shell in bash zsh fish elvish pwsh tcsh; do + ./direnv hook ${shell} > shell-init/${shell} || die + done +} + +src_install() { + einstalldocs + emake DESTDIR="${ED}" PREFIX="/usr" install + + insinto "/usr/share/${PN}" + doins -r shell-init + + greadme_stdin <<-EOF + Gentoo installs direnv's shell-init code under + /usr/share/direnv/shell-init/ + Therefore, instead of using, e.g. 'eval \"\$(direnv hook zsh)\"' in + your .zshrc you can put \"source /usr/share/direnv/shell-init/zsh\" + there, which avoids the cost of forking a process. Although direnv + does that a lot anyways. +EOF +} diff --git a/app-shells/direnv/direnv-2.34.0.ebuild b/app-shells/direnv/direnv-2.34.0.ebuild deleted file mode 100644 index 3c095b2..0000000 --- a/app-shells/direnv/direnv-2.34.0.ebuild +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit go-module - -DESCRIPTION="Environment variable manager for shell" -HOMEPAGE="https://github.com/direnv/direnv" -SRC_URI="https://github.com/direnv/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" -SRC_URI+=" https://share.terinstock.com/${P}-vendor.tar.xz" - -LICENSE="MIT" -LICENSE+=" BSD" -SLOT="0" -KEYWORDS="~amd64" -RESTRICT="test" # fails - -src_install() { - einstalldocs - emake DESTDIR="${ED}" PREFIX="/usr" install -} |