From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MJllAxJGS2cP6QAAe85BDQ:P1 (envelope-from ) for ; Sat, 30 Nov 2024 17:06:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id MJllAxJGS2cP6QAAe85BDQ (envelope-from ) for ; Sat, 30 Nov 2024 18:06:26 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=bNeY3QP9; dkim=fail ("headers rsa verify failed") header.d=struct.foo header.s=fm3 header.b=LUxu+cr2; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="T 7pUAsR"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=struct.foo (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732986385; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YYgF7dnKMnJ9oY3Hzoy0NRRTHTX+K5DwQmbvJpGszKc=; b=HZW/oj8jRAoN98IYpFNVSjOc9ZZptJP0ePA9fbmwBsRXjl+x9hj1JIPZIna1gZcnSxUA9d BrJFZ3EtXKSf3b1UUL67233iR+uKr4qNrIT5rXQ6+E2567eAohgV/Fmc9tH7Cy35mg8CAw myYiD+MyuHn1HY3GepkaId/nkt0tTTQaUCwOm3HeAtna+xdWRvZmf95xNoxvwW2Pm85rck zlpz+0DkmPSQvJmcKreAzFb0GQM8KB4jcm+iH1V1p/DCTfN74A/1iW78ejfOhPBuK+tr4V WNMd6oPglEU4aA/coANDQnWWvOF8v1AsvaNQQ2du1BGlxEDk9Ko0MOdrUJHasw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=bNeY3QP9; dkim=fail ("headers rsa verify failed") header.d=struct.foo header.s=fm3 header.b=LUxu+cr2; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="T 7pUAsR"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=struct.foo (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732986385; a=rsa-sha256; cv=none; b=dzR6BVt0iuZq4N91sgWHAjejUvQKqNzHpHDjrG0eFDknLqWjZg7eNGGa/WXatHwLuDFV8b es2Cb5jC31OiCfu2fCD5cImbEQqBXB7ajj+KRPp1QxtKQkHAIHmPv/Bu4IncNQ8P3StL7y TXDDLfX94cDTM9L9cW10bcTdolIu/f6vvqsmk3ufsj6V4TttVW9oyEd7RS3PLep1yHFFmu tYUSW14JdpzsjhaUciQlEJyGCpUEKa1VhShuLh45cObn9p5XGOYDQPx9pDScPziwDRtTqO jgWcMkeDKgO6AVfuUpGaT8L2L13WNezV4EnuQbAhEEgXg6uRC9/qjDtInHXcEA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D0EED42127 for ; Sat, 30 Nov 2024 18:06:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHQuo-0008IS-Gy; Sat, 30 Nov 2024 12:05:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHQuK-0007Zz-3S for guix-patches@gnu.org; Sat, 30 Nov 2024 12:05:26 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHQuH-0001PG-PA for guix-patches@gnu.org; Sat, 30 Nov 2024 12:05:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=YYgF7dnKMnJ9oY3Hzoy0NRRTHTX+K5DwQmbvJpGszKc=; b=bNeY3QP9ywJp3ETj1tDx/OlJajCovg8RxUUkXk7dufCCQiSxreeDkZZprp51cQ0TN9ow5fz0gvqNsxnPifCug2yuxUeWoN2C0AaQcyCD7iMvNCL4e3Ytg1Tu3ozZyZ/4F5++2xAIBuYHsYLvmisxJt11L4OYOqBty73bVVddxjbhRLfmA2yPbAd5e2vqNr+Oa14Q462E/aAEwIuEfFR1e/LbiBVeT/JOcXSRi7wK7x1aDt4tAaucDKU6rKM7XSBnG2kbRfqsz1yBYl777kUvQ7Ry2okk9L9xT5kI9GrKsfa3gyoKGRqj8i8yEuqc/jAbYqoJkx3lCROB/b5+rbAaAw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHQuH-00054t-Hz for guix-patches@gnu.org; Sat, 30 Nov 2024 12:05:21 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74551] [PATCH v2 49/49] gnu: Add starship. Resent-From: Jordan Moore Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Nov 2024 17:05:21 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74551 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74551@debbugs.gnu.org Cc: Jordan Moore Received: via spool by 74551-submit@debbugs.gnu.org id=B74551.173298630519007 (code B ref 74551); Sat, 30 Nov 2024 17:05:21 +0000 Received: (at 74551) by debbugs.gnu.org; 30 Nov 2024 17:05:05 +0000 Received: from localhost ([127.0.0.1]:48792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHQtz-0004vP-If for submit@debbugs.gnu.org; Sat, 30 Nov 2024 12:05:05 -0500 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]:59113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHQsN-0004j8-1z for 74551@debbugs.gnu.org; Sat, 30 Nov 2024 12:03:25 -0500 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 02BAD1380501; Sat, 30 Nov 2024 12:03:18 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Sat, 30 Nov 2024 12:03:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=struct.foo; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1732986197; x=1733072597; bh=YYgF7dnKMnJ9oY3Hzoy0NRRTHTX+K5DwQmbvJpGszKc=; b= LUxu+cr2B8fOSZeNmPv30lR3kXeVzCTCZAbTYwYJ4XK/aLYvXgcrbhbKtoduZns/ //ePGMTDx1bv5+swc+XTzs7WnYcgmWc2My9dQuFkPg/qYb0JiaB51nQv+mF+oFjg S5ikPUCLJ8dRwZTlap1IMUi2ar1aObPICObFYEUN/s5APT6JhygZ55903T2UNiYD I9hHNh1oVBjaVGDQM9hX1ZdQmiKuBRDXAjmFD65VxCo87bUpVc23nZfQKoOncD3u AnoaX4nBjHil4IJyV+WGYxfTnUH4qguVL6/jrdVWnwDZHKWN8UDKvNDPlf2HIr9s vX2lkD+pFg2WwGS0ElEAhw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1732986197; x= 1733072597; bh=YYgF7dnKMnJ9oY3Hzoy0NRRTHTX+K5DwQmbvJpGszKc=; b=T 7pUAsRYoPVVlo/WKJ8clNO2Gpm5fXepGXDef3ARtxW6O6X93XJm4iku6nS9gwHoe eW3TgWZ+ZU10NpC3DJmBJuCuXn+cJjC9dv/JFXj/1VGgJlt3euPit/TGBeCVjA9H oTJT1XmxmHMlVacKYtuD0vrgRvr0t4Ptt96uj/mQphMhdl2L3PgwTGDw1ecmux/n 389taTJhx1G2LPYMy8QVK2DoInBZKJ0LDa+Fj+DhmeoGTsTufzA+Wz8sSYEfXTOy iAoFwmhj6YiUhO4swvs+0Wqz/MWWLZXtD92vlKvgy+MyVb1IYeOvdOSR7kNeB6+e D1kWIP3q16db+vkEBeBbQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrheehgdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefuff fkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpeflohhruggrnhcuofhoohhrvgcu oehlohgtkhgsohigsehsthhruhgtthdrfhhooheqnecuggftrfgrthhtvghrnheptdehfe eiiedvhefgueekffdtueejheehveeutedvfedutedukedtgefhtdegheehnecuffhomhgr ihhnpehmihhrsghsugdrohhrghdpshhtrghrshhhihhprdhrshenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlohgtkhgsohigsehsthhruhgt thdrfhhoohdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohepjeegheehudesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehlohgt khgsohigsehsthhruhgtthdrfhhooh X-ME-Proxy: Feedback-ID: i4d1648a8:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 30 Nov 2024 12:03:17 -0500 (EST) From: Jordan Moore Date: Sat, 30 Nov 2024 11:55:24 -0500 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 0.50 X-Spam-Score: 0.50 X-Migadu-Queue-Id: D0EED42127 X-TUID: 8uiAqXgBYLTW * gnu/packages/shellutils.scm (starship): New variable. Change-Id: I06814793f245c5b4aca5491a3b68b1ec83c3318f --- gnu/packages/shellutils.scm | 137 ++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 7e9f85a5f2..101ee6cf73 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Artyom V. Poptsov ;;; Copyright © 2024 Brian Kubisiak +;;; Copyright © 2024 Jordan Moore ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,6 +44,7 @@ (define-module (gnu packages shellutils) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cargo) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system go) @@ -51,6 +53,11 @@ (define-module (gnu packages shellutils) #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages check) + #:use-module (gnu packages cmake) + #:use-module (gnu packages crates-crypto) + #:use-module (gnu packages crates-io) + #:use-module (gnu packages crates-vcs) + #:use-module (gnu packages crates-windows) #:use-module (gnu packages flex) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-check) @@ -67,6 +74,7 @@ (define-module (gnu packages shellutils) #:use-module (gnu packages shells) #:use-module (gnu packages textutils) #:use-module (gnu packages tmux) + #:use-module (gnu packages version-control) #:use-module (gnu packages vim)) (define-public ascii @@ -462,6 +470,135 @@ (define-public shfmt @url{http://www.mirbsd.org/mksh.htm,mksh}.") (license license:bsd-3))) +(define-public starship + (package + (name "starship") + (version "1.21.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "starship" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1ikdy6jwlc36add55acxlba6f009dln9iyz368c1ndbfpgn4n42g")))) + (build-system cargo-build-system) + (inputs (list cmake-minimal + ;; for tests + git)) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-after 'install 'install-completions + (lambda* (#:key outputs skip-build? #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (starship-bin (string-append out "/bin/starship")) + (share-files (string-append out "/share")) + (bash-files (string-append out + "/etc/bash-completion.d/")) + (zsh-files (string-append share-files + "/zsh/site-functions/")) + (fish-files (string-append share-files + "/fish/vendor_completions.d/"))) + ;; we cannot make completions if starship was not built + (or skip-build? + ;; make the directories + (mkdir-p bash-files) + (mkdir-p zsh-files) + (mkdir-p fish-files) + ;; use the build starship to generate the necessary + ;; completions + (invoke starship-bin "completions" "bash" ">" + (string-append bash-files "/starship")) + (invoke starship-bin "completions" "zsh" ">" + (string-append zsh-files "/_starship")) + (invoke starship-bin "completions" "fish" ">" + (string-append fish-files + "/starship.fish")))))) + ;; some tests require a writable home directory + (add-after 'unpack 'patch-test-shell + (lambda* (#:key inputs #:allow-other-keys) + ;; search through the rust files and then replace `/bin/sh' + ;; with the path to the `/bin/sh' in the drv inputs + (let ((rust-files (find-files "." "\\.rs$"))) + (for-each (lambda (file) + (substitute* file + (("/bin/sh") + (search-input-file inputs "/bin/sh")))) + rust-files)))) + ;; Set "HOME" to be located inside the cwd so it is writable + ;; for tests checking for user-configs + (add-before 'check 'set-test-env-vars + (lambda _ + (setenv "HOME" + (string-append (getcwd) "/.test-home"))))) + #:cargo-inputs `(("rust-chrono" ,rust-chrono-0.4) + ("rust-clap" ,rust-clap-4) + ("rust-clap-complete" ,rust-clap-complete-4) + ("rust-deelevate" ,rust-deelevate-0.2) + ("rust-dirs" ,rust-dirs-5) + ("rust-dunce" ,rust-dunce-1) + ("rust-gix" ,rust-gix-0.66) + ("rust-gix-features" ,rust-gix-features-0.38) + ("rust-guess-host-triple" ,rust-guess-host-triple-0.1) + ("rust-home" ,rust-home-0.5) + ("rust-indexmap" ,rust-indexmap-2) + ("rust-log" ,rust-log-0.4) + ("rust-nix" ,rust-nix-0.29) + ("rust-notify-rust" ,rust-notify-rust-4) + ("rust-nu-ansi-term" ,rust-nu-ansi-term-0.50) + ("rust-open" ,rust-open-5) + ("rust-os-info" ,rust-os-info-3) + ("rust-path-slash" ,rust-path-slash-0.2) + ("rust-pest" ,rust-pest-2) + ("rust-pest-derive" ,rust-pest-derive-2) + ("rust-process-control" ,rust-process-control-5) + ("rust-quick-xml" ,rust-quick-xml-0.36) + ("rust-rand" ,rust-rand-0.8) + ("rust-rayon" ,rust-rayon-1) + ("rust-regex" ,rust-regex-1) + ("rust-rust-ini" ,rust-rust-ini-0.21) + ("rust-schemars" ,rust-schemars-0.8) + ("rust-semver" ,rust-semver-1) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-sha1" ,rust-sha1-0.10) + ("rust-shadow-rs" ,rust-shadow-rs-0.35) + ("rust-shell-words" ,rust-shell-words-1) + ("rust-starship-battery" ,rust-starship-battery-0.10) + ("rust-strsim" ,rust-strsim-0.11) + ("rust-systemstat" ,rust-systemstat-0.2) + ("rust-terminal-size" ,rust-terminal-size-0.4) + ("rust-toml" ,rust-toml-0.8) + ("rust-toml-edit" ,rust-toml-edit-0.22) + ("rust-unicode-segmentation" ,rust-unicode-segmentation-1) + ("rust-unicode-width" ,rust-unicode-width-0.2) + ("rust-urlencoding" ,rust-urlencoding-2) + ("rust-versions" ,rust-versions-6) + ("rust-which" ,rust-which-6) + ("rust-whoami" ,rust-whoami-1) + ("rust-windows" ,rust-windows-0.58) + ("rust-winres" ,rust-winres-0.1) + ("rust-yaml-rust2" ,rust-yaml-rust2-0.9)) + #:cargo-development-inputs `(("rust-mockall" ,rust-mockall-0.13) + ("rust-tempfile" ,rust-tempfile-3)))) + (home-page "https://starship.rs") + (synopsis + "The minimal, blazing-fast, and infinitely customizable prompt for any shell!") + (description + "This package provides The minimal, blazing-fast, and infinitely customizable +prompt for any shell! + +@itemize +@item Fast: it's fast - *really really* fast :rocket: +@item Customizable: configure every aspect of your prompt +@item Universal: works on any shell, on any operating system +@item Intelligent: shows relevant information at a glance +@item Feature rich: support for all your favorite tools +@item Easy: quick to install - start using it in minutes +@end itemize + +Note: users must have a nerd font installed and enabled in their terminal") + (license license:isc))) (define-public envstore (package -- 2.46.0