Skip to content

Commit

Permalink
Add starship shell prompt (#1567)
Browse files Browse the repository at this point in the history
  • Loading branch information
papertigers authored Jan 9, 2025
1 parent 7bbb929 commit 4544ecb
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 0 deletions.
53 changes: 53 additions & 0 deletions build/starship/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}

# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.

. ../../lib/build.sh

PROG=starship
VER=1.21.1
PKG=ooce/terminal/starship
SUMMARY="cross-shell prompt"
DESC="The minimal, blazing-fast, and infinitely customizable prompt for any shell!"

BUILD_DEPENDS_IPS="
ooce/developer/rust
"

SKIP_SSP_CHECK=1

CARGO_ARGS="--no-default-features --features=gix-max-perf"

set_arch 64

pre_build() {
typeset arch=$1

export RUSTFLAGS="-C link-arg=-R$PREFIX/${LIBDIRS[$arch]}"
}

init
clone_github_source $PROG "$GITHUB/starship/$PROG" $VER
append_builddir $PROG
patch_source
prep_build
build_rust $CARGO_ARGS
install_rust
strip_install
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
14 changes: 14 additions & 0 deletions build/starship/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

# Copyright 2025 OmniOS Community Edition (OmniOSce) Association.

license LICENSE license=ISC
11 changes: 11 additions & 0 deletions build/starship/patches/do-not-strip-symbol-table.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -wpruN --no-dereference '--exclude=*.orig' a~/Cargo.toml a/Cargo.toml
--- a~/Cargo.toml 2025-01-06 16:32:07.099033407 +0000
+++ a/Cargo.toml 2025-01-06 16:32:17.865571999 +0000
@@ -128,7 +128,6 @@ tempfile = "3.15.0"
[profile.release]
codegen-units = 1
lto = true
-strip = true

[[bin]]
name = "starship"
1 change: 1 addition & 0 deletions build/starship/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
do-not-strip-symbol-table.patch
1 change: 1 addition & 0 deletions doc/baseline
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ extra.omnios ooce/system/znapzend
extra.omnios ooce/system/zrepl
extra.omnios ooce/terminal/byobu
extra.omnios ooce/terminal/minicom
extra.omnios ooce/terminal/starship
extra.omnios ooce/text/asciidoc
extra.omnios ooce/text/asciidoctor
extra.omnios ooce/text/asciinema
Expand Down
1 change: 1 addition & 0 deletions doc/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
| ooce/system/zrepl | 0.6.1 | https://github.com/zrepl/zrepl/releases | [omniosorg](https://github.com/omniosorg)
| ooce/terminal/byobu | 5.133 | https://launchpad.net/byobu/+download https://launchpad.net/byobu/ | [omniosorg](https://github.com/omniosorg)
| ooce/terminal/minicom | 2.9 | https://salsa.debian.org/api/v4/projects/minicom-team%2Fminicom/repository/tags/ https://salsa.debian.org/minicom-team/minicom/ | [omniosorg](https://github.com/omniosorg)
| ooce/terminal/starship | 1.21.1 | https://github.com/starship/starship/releases https://starship.rs | [omniosorg](https://github.com/omniosorg)
| ooce/text/asciidoc | 10.2.1 | https://pypi.org/project/asciidoc | [omniosorg](https://github.com/omniosorg)
| ooce/text/asciidoctor | 2.0.23 | https://github.com/asciidoctor/asciidoctor/releases/ | [omniosorg](https://github.com/omniosorg)
| ooce/text/asciinema | 2.4.0 | https://github.com/asciinema/asciinema/releases | [omniosorg](https://github.com/omniosorg)
Expand Down

0 comments on commit 4544ecb

Please sign in to comment.