diff options
| author | 2025-11-26 00:02:43 +0100 | |
|---|---|---|
| committer | 2025-11-26 00:54:43 +0100 | |
| commit | a136e5ee3955e5ee7122950dd91bc71e79aa1c1d (patch) | |
| tree | cad492fab6b6f0c31c728a1e042cc1b42fb22aff /app-shells/direnv/direnv-2.37.1.ebuild | |
| parent | app-crypt/lego: add 4.28.1, drop 4.21.0 (diff) | |
| download | ebuilds-a136e5ee3955e5ee7122950dd91bc71e79aa1c1d.tar.xz | |
app-shells/direnv: add 2.37.1, drop 2.34.0-r0
Diffstat (limited to 'app-shells/direnv/direnv-2.37.1.ebuild')
| -rw-r--r-- | app-shells/direnv/direnv-2.37.1.ebuild | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/app-shells/direnv/direnv-2.37.1.ebuild b/app-shells/direnv/direnv-2.37.1.ebuild new file mode 100644 index 0000000..e34d8f7 --- /dev/null +++ b/app-shells/direnv/direnv-2.37.1.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 +} |
