bootstrap: Add pipx managed package installation

Packages managed through pipx (and pipx itself) are now also
installed in the initial process. They are marked as coming
from 'P' source in the package TSV. There is a special field
for these packages which declares any injections made by pipx
which will also automatically get injected into the pipx
environment on installation.
This commit is contained in:
Marty Oehme 2023-06-08 13:05:01 +02:00
parent bfe7e7790c
commit 29cb20efcb
Signed by: Marty
GPG Key ID: EDBF2ED917B2EF6A
2 changed files with 40 additions and 3 deletions

View File

@ -7,9 +7,10 @@
# DESCRIPTION: Display usage information for this script.
# PARAMETERS: see usage function
#==============================================================================
packages_repo="${BOOTSTRAP_PACKAGES:-$(grep -e ' R ' "$PKG_TSV_FILE" | cut -f1 -d' ' )}"
packages_aur="${BOOTSTRAP_PACKAGES_AUR:-$(grep -e ' A ' "$PKG_TSV_FILE" | cut -f1 -d' ' )}"
PKG_TSV_FILE=${PKG_TSV_FILE:-bootstrap/packages_stable.tsv}
packages_repo="${BOOTSTRAP_PACKAGES:-$(grep -e ' R ' "$PKG_TSV_FILE" | cut -f1 -d' ')}"
packages_aur="${BOOTSTRAP_PACKAGES_AUR:-$(grep -e ' A ' "$PKG_TSV_FILE" | cut -f1 -d' ')}"
packages_pipx="${BOOTSTRAP_PACKAGES_PIPX:-$(grep -e ' P ' "$PKG_TSV_FILE" | cut -f1,5 -d' ')}"
main() {
local cmd=""
@ -69,6 +70,31 @@ install_packages() {
fi
}
install_pipx() {
if type pipx >/dev/null 2>&1; then
echo "Existing pipx installation found .........................................."
return
fi
if "$unattended"; then
paru -S --noconfirm python-pipx
else
paru -S python-pipx
fi
}
install_pipx_pkgs() {
while IFS= read -r line; do
if [ -z "$line" ]; then return; fi
prog=$(echo "$line" | cut -f1 -d' ')
pipx install "$prog"
injections=$(echo "$line" | cut -f2 -d' ')
for inject_args in ${injections//,/ }; do
pipx inject "$prog" "$inject_args"
done
done <<<"$packages_pipx"
}
install() {
unattended=$1
echo "Beginning package bootstrap ..............................................."
@ -78,6 +104,11 @@ install() {
update_repos "$unattended"
install_packages "$unattended"
echo "Done ......................................................................"
echo "Installing pipx ..........................................................."
install_pipx
echo "Installing pipx packages .................................................."
install_pipx_pkgs
echo "Done ......................................................................"
}
main "$@"

View File

@ -25,7 +25,9 @@ bash-completion Programmable completion for the bash shell R
bash-language-server Bash language server implementation based on Tree Sitter and its grammar for Bash R
bat Cat clone with syntax highlighting and git integration R
bc An arbitrary precision calculator language R
beancount A personal double entry accounting and budgeting software P beancount-categorizer,beancount-dkb,fava,python-magic,smart-importer
bearssl Implementation of the SSL/TLS protocol (RFC 5246) written in C R
beets Organize your music collection from the command line P beetcamp
bemoji-git Emoji picker that remembers your favorites. A
bibclean BibTeX and Scribe bibliography prettyprinter and syntax checker A
biber A Unicode-capable BibTeX replacement for biblatex users R
@ -61,6 +63,7 @@ dust A more intuitive version of du in rust R
efm-langserver General purpose Language Server A
enca Charset analyser and converter R
entr Run arbitrary commands when files change R
euporie View and work with ipnb Python notebooks from the cli P
exa ls replacement R
exercism-bin Command line client for exercism.io A
exfat-utils Utilities for exFAT file system R
@ -107,6 +110,7 @@ imv Image viewer for Wayland and X11 R
intel-ucode Microcode update files for Intel CPUs R
iputils Network monitoring tools, including ping R
ipython An enhanced Interactive Python shell. R
isbntools A variety of tools to work with isbn addresses P
iucode-tool Tool to manipulate Intel® IA-32/X86-64 microcode bundles R
iwd Internet Wireless Daemon R
jiq-bin Interactive JSON query tool using jq expressions A
@ -148,6 +152,7 @@ maim Utility to take a screenshot using imlib2 R
mako Lightweight notification daemon for Wayland R
man-db A utility for reading man pages R
man-pages Linux man pages R
markdown-anki-decks Construct and modify anki decks directly with markdown P
markdownlint-cli MarkdownLint Command Line Interface A
masterpdfeditor-free A complete solution for creation and editing PDF files - Free version without watermark A
mbsync-git free (GPL) mailbox synchronization program A
@ -198,6 +203,7 @@ offpunk-git Fork of the command-line Gemini client AV-98 with added offline capa
oh-my-zsh-git A community-driven framework for managing your zsh configuration. Includes 180+ optional plugins and over 120 themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community A
os-prober Utility to detect other OSes on a set of drives R
pacman-contrib Contributed scripts and tools for pacman systems R
papis-tui A tui interface for papis bibliography manager P whoosh
parallel A shell tool for executing jobs in parallel R
parsec-bin Remotely connect to a gaming pc for a low latency remote computing experience A
paru-bin Feature packed AUR helper A
@ -342,9 +348,9 @@ xdg-user-dirs Manage user directories like ~/Desktop and ~/Music R
xsv A CLI for indexing, slicing, analyzing, splitting and joining CSV files R
yaml-language-server YAML Language Server R
yarn Fast, reliable, and secure dependency management R
yubikey-manager Python library and command line tool for configuring a YubiKey R
yt-dlp A youtube-dl fork with additional features and fixes R
ytfzf A POSIX script to find and watch youtube videos from the terminal R
yubikey-manager Python library and command line tool for configuring a YubiKey R
zathura-cb Adds comic book support to zathura R
zathura-djvu DjVu support for Zathura R
zathura-pdf-mupdf PDF support for Zathura (MuPDF backend) (Supports PDF, ePub, and OpenXPS) R

Can't render this file because it has a wrong number of fields in line 28.