mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
app-shells/atuin: add 18.13.2
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
@@ -4,5 +4,8 @@ DIST atuin-18.11.0-crates.tar.xz 48268880 BLAKE2B a4dcab9fe0e722ef03fe166ad93208
|
||||
DIST atuin-18.11.0.tar.gz 755825 BLAKE2B 9752ef1538382f1e540a411e39d27884372049263aa0efa713ba258a1a78c0404b94dd4e91bbff732dc030684a43afe91985083d6403ff302e292b2e7f6337b2 SHA512 f1ed97724c9da416266ed56ec65a33f76158a5d9fa256acb212f37152f3e674e447841a1628f370c8a74a0c63a49b21c828990407452108bfb47b3b8c7f8a8fc
|
||||
DIST atuin-18.12.1-crates.tar.xz 47755644 BLAKE2B 8d072faf732d1e609b7d5daf18f443636047748be5137b453ad4b47dccfd409671eddae347d26ffff31703c86817f870b7f8cd755a704f78e6f23a9bb336fa30 SHA512 695aea3ff5876a175cff45c9a24a664df75c98de0432d3414a8c9e247477fdc611ea0f0f24a5637f916cec6deb41812afd0caee3a8bcc0abcf87e6033fc5c22f
|
||||
DIST atuin-18.12.1.tar.gz 803329 BLAKE2B e3c511e05e67833cc37a25679543248de88dc682d9bf35964f98a0ffbb6668a9b873250bd84064e2d69a0150cdc64272c89ec951fd731cab0c5c97a46f504bd7 SHA512 a4cd826e23a9923507102c480d46bf2398f89e82c28726490fb48bfebcab4ebd62fb79c9a38976c53f36f0377f8815acb0a350ebeaedfd09d7ace5a7a7d8b92d
|
||||
DIST atuin-18.13.2-crates.tar.xz 49133816 BLAKE2B 29b35f2e886f128a3f92403dd51f0f6e6a0372f04aa8a33a42459e1947282c04032332009fba648377aa3ab4fc4741b03d55faebb5c7f5104f9201c6472b0c35 SHA512 06f6705001a1ac12ff1c8834fb8c0e5187c28ab34ea232623a53dedce78950ab4ff63458cdae875bbc4fadab65878488ddb65c9dce7c76f49edfd6d0f8d1baa4
|
||||
DIST atuin-18.13.2.tar.gz 921485 BLAKE2B 7e5ed37621b68fc182de494608682f861abccc020467806536e983b45766f018877d2d55fe196dd08ae07125c091f9b101d32fcea3369fa3012ff9ed27b22fc6 SHA512 acd8819d90cf2dcf1f8d1fea83d98a41beae59efd3f03b8e97459c9976c37131ae5768e5545dce4ad8a760ada6e84c35cad768387919ed8b18e3be9b0264b4c0
|
||||
DIST atuin-18.8.0-crates.tar.xz 43766044 BLAKE2B 1bcd92baee29be549f1aab0c58f05d2f557e631f00bff09ebd4776a561909aa471e004ce8bb70204d61e95e2741b15d7e7b72d60ced8314b34d7dd5ebd72bac2 SHA512 6504943dae2ebe775efce6c22e226a9c836ece4daafed823b27e778688c271798a193c916cce87112f84cb3e0e1f6bc9e277f77783af9bd9a5ec97605cbb7f55
|
||||
DIST atuin-18.8.0.tar.gz 672900 BLAKE2B b041970e54c4d99522893c1a847facbebb8ee05e7e644353778533d55f61026c72b423c03d9393649e0877ac42d41472d3c0aa2f83fcd8b60e9652089b042585 SHA512 2a0078484eb6a89c5da3d5dc4409d77183b59e5f1277e58229d9f2686eea6353d22b77626663283f1635c5476ab91f35f0862ac2aca9bc81cc0fc008ce44ef72
|
||||
DIST nucleo-ext-74bd786e98f7c88d68f967855d6f57b3ac2d09ef.gh.tar.gz 90077 BLAKE2B 5aae5fbdf0e387025e898373a4bf861fb5137033b1f2811cd3c56d10fce3fd0a81e7f48e032d46f04d322aa82b816ff067919205253efbe464adcdb632221826 SHA512 8d332f6efc5617283c4b9aac5b400ca79af7fa04e06a82b4eaab8bd78ff671203e3ded31328b932d7d98a7fac898ad36bf55458fcd7d96d7f767b2434597ff42
|
||||
|
||||
158
app-shells/atuin/atuin-18.13.2.ebuild
Normal file
158
app-shells/atuin/atuin-18.13.2.ebuild
Normal file
@@ -0,0 +1,158 @@
|
||||
# Copyright 2023-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
RUST_MIN_VER="1.94"
|
||||
|
||||
declare -A GIT_CRATES=(
|
||||
[nucleo-matcher]='https://github.com/atuinsh/nucleo-ext;74bd786e98f7c88d68f967855d6f57b3ac2d09ef;nucleo-ext-%commit%/matcher'
|
||||
[nucleo]='https://github.com/atuinsh/nucleo-ext;74bd786e98f7c88d68f967855d6f57b3ac2d09ef;nucleo-ext-%commit%'
|
||||
)
|
||||
|
||||
inherit cargo greadme shell-completion systemd
|
||||
|
||||
DESCRIPTION="Shell history manager supporting encrypted synchronisation"
|
||||
HOMEPAGE="https://atuin.sh https://github.com/atuinsh/atuin"
|
||||
SRC_URI="https://github.com/atuinsh/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI+=" https://github.com/gentoo-crate-dist/atuin/releases/download/v${PV}/${P}-crates.tar.xz"
|
||||
SRC_URI+=" ${CARGO_CRATE_URIS}"
|
||||
|
||||
LICENSE="MIT"
|
||||
# Dependent crate licenses
|
||||
# - openssl for ring crate
|
||||
LICENSE+="
|
||||
Apache-2.0 BSD Boost-1.0 CC0-1.0 CDLA-Permissive-2.0 ISC MIT MPL-2.0 openssl
|
||||
Unicode-3.0 WTFPL-2 ZLIB
|
||||
"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~riscv"
|
||||
IUSE="+client +daemon server system-sqlite test +sync"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="
|
||||
|| ( client server )
|
||||
sync? ( client )
|
||||
test? ( client server sync )
|
||||
"
|
||||
DEPEND="system-sqlite? ( dev-db/sqlite:3 )"
|
||||
RDEPEND="${DEPEND}
|
||||
server? ( acct-user/atuin )
|
||||
"
|
||||
BDEPEND="test? ( dev-db/postgresql )"
|
||||
|
||||
QA_FLAGS_IGNORED="usr/bin/${PN}"
|
||||
|
||||
GREADME_DISABLE_AUTOFORMAT=1
|
||||
|
||||
DOCS=( CONTRIBUTING.md CONTRIBUTORS README.md )
|
||||
|
||||
src_configure() {
|
||||
# Using system-sqlite has a negative performance impact
|
||||
# see https://bugs.gentoo.org/959120
|
||||
use system-sqlite && export LIBSQLITE3_SYS_USE_PKG_CONFIG=1
|
||||
local myfeatures=(
|
||||
$(usev client)
|
||||
$(usev daemon)
|
||||
$(usev sync)
|
||||
)
|
||||
cargo_src_configure --no-default-features
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cargo_src_compile --bin ${PN}
|
||||
|
||||
if use server; then
|
||||
cargo_src_compile --bin atuin-server
|
||||
fi
|
||||
|
||||
ATUIN_BIN="$(cargo_target_dir)/${PN}"
|
||||
|
||||
# Prepare shell completion generation
|
||||
mkdir completions || die
|
||||
local shell
|
||||
for shell in bash fish zsh; do
|
||||
"${ATUIN_BIN}" gen-completions \
|
||||
-s ${shell} \
|
||||
-o completions \
|
||||
|| die
|
||||
done
|
||||
|
||||
if ! use client; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
mkdir shell-init || die
|
||||
for shell in bash fish zsh; do
|
||||
"${ATUIN_BIN}" init ${shell} > shell-init/${shell} || die
|
||||
done
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local postgres_dir="${T}"/postgres
|
||||
initdb "${postgres_dir}" || die
|
||||
|
||||
local port=11123
|
||||
# -h '' --> only socket connections allowed.
|
||||
postgres -D "${postgres_dir}" \
|
||||
-k "${postgres_dir}" \
|
||||
-p "${port}" &
|
||||
local postgres_pid=${!}
|
||||
|
||||
local timeout_secs=30
|
||||
timeout "${timeout_secs}" bash -c \
|
||||
'until printf "" >/dev/tcp/${0}/${1} 2>> "${T}/portlog"; do sleep 1; done' \
|
||||
localhost "${port}" || die "Timeout waiting for postgres port ${port} to become available"
|
||||
|
||||
psql -h localhost -p "${port}" -d postgres <<-EOF || die "Failed to configure postgres"
|
||||
create database atuin;
|
||||
create user atuin with encrypted password 'pass';
|
||||
grant all privileges on database atuin to atuin;
|
||||
\connect atuin
|
||||
grant all on schema public to atuin;
|
||||
EOF
|
||||
|
||||
# Subshell so that postgres_pid is in scope when the trap is executed.
|
||||
(
|
||||
cleanup() {
|
||||
kill "${postgres_pid}" || die "failed to send SIGTERM to postgres"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
ATUIN_DB_URI="postgres://atuin:pass@localhost:${port}/atuin" cargo_src_test
|
||||
)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin "${ATUIN_BIN}"
|
||||
|
||||
if use server; then
|
||||
dobin "${ATUIN_BIN}-server"
|
||||
systemd_dounit "${FILESDIR}/atuin.service"
|
||||
fi
|
||||
|
||||
dodoc -r "${DOCS[@]}"
|
||||
|
||||
newbashcomp "completions/${PN}.bash" "${PN}"
|
||||
dozshcomp "completions/_${PN}"
|
||||
dofishcomp "completions/${PN}.fish"
|
||||
|
||||
if use daemon; then
|
||||
systemd_douserunit "${FILESDIR}"/atuin-daemon.{service,socket}
|
||||
fi
|
||||
|
||||
if ! use client; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
insinto "/usr/share/${PN}"
|
||||
doins -r shell-init
|
||||
|
||||
# The following readme text is only relevant if USE=client.
|
||||
greadme_stdin <<-EOF
|
||||
Gentoo installs atuin's shell-init code under
|
||||
/usr/share/atuin/shell-init/
|
||||
Therefore, instead of using, e.g., 'eval \"\$(atuin init zsh)\"' in
|
||||
your .zshrc you can simply put \"source /usr/share/atuin/shell-init/zsh\"
|
||||
there, which avoids the cost of forking a process.
|
||||
EOF
|
||||
}
|
||||
Reference in New Issue
Block a user