From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QNVQOst+TmfROgEAqHPOHw:P1 (envelope-from ) for ; Tue, 03 Dec 2024 03:45:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id QNVQOst+TmfROgEAqHPOHw (envelope-from ) for ; Tue, 03 Dec 2024 04:45:16 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Qf+Og0ed; dkim=fail ("headers rsa verify failed") header.d=ieee.org header.s=google header.b=b9GOPAac; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733197515; a=rsa-sha256; cv=none; b=kZDwBbq+TQTlxc5Z4iv/ZEaPBwOnHJzLmqSYiqMBQ8ydYRRa4ANNTQdz/Q8ESR7gRilpWY u/r8h+WRrFiY1m6ZS8bqQn43OBVal8jS8RTr4/Od9lUg6Zz6kZyR6RwUZOrrsvlQgsWMGK CRzeoRfEQUiGvFtv3HQ4pQytKFCeFBEqsnQgIcHL7+1Al00/nJ7hSRV3qTBQAHU987saXD 2JmXTHpKEpjQ8YcvkMXBcGyj6DCunjyV2pJ3927cSM8mpqCuAEFqsZc4ecdE0FRUEuQT75 8B6uFpfHzj1pZdVzl0lg7ol1ZrAVZ7tfQTkjmyBuNop7QJRbebrBeF7WykLDbw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Qf+Og0ed; dkim=fail ("headers rsa verify failed") header.d=ieee.org header.s=google header.b=b9GOPAac; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733197515; h=from:from:sender:sender:reply-to: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=ewKB4YRBPbw26JIl4UbtOzepGUEVvWdNMtxcyvGVwBk=; b=KkN5szaLbQNvprPemeSi13T7a0zvXNEx57o86M64Z9JASaeZIbNRfFuykkZoazYW8wFLhd kHz/GX+w3I9QGKVFQrkXrcobB6ygJdSeNu7zvvinF3HZcZZAGrgvRC+HyTRuMnUzuBBezk ca0Hxkjacvx0PfWgYVE+JskA21EH2iWsZ/ptmv4kO8o9PXGlZdAWk8+O8ZwAzOs9rBdQl8 d9oOSzt7se0fJ7clRSgyTvje8mj0qIg7LlTYkWVPVbZFo5amwBkRgMS4PpZsezDghj2dyZ CqN2HW4PWBleYm9I8g8viSC2q0h45YVS7L0NNvaUoR/tzhf4fE8Tlt8xYsSVDw== 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 13E48671AA for ; Tue, 03 Dec 2024 04:45:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIJqS-0005Bt-HU; Mon, 02 Dec 2024 22:45:04 -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 1tIJqQ-0005Bi-T9 for guix-patches@gnu.org; Mon, 02 Dec 2024 22:45:03 -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 1tIJqQ-0006X6-Cj for guix-patches@gnu.org; Mon, 02 Dec 2024 22:45:02 -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=ewKB4YRBPbw26JIl4UbtOzepGUEVvWdNMtxcyvGVwBk=; b=Qf+Og0ed8yeEn3AmzS3D/Z30Vu7iN6xHyImrHcuLR1GWYxt+91wjThWIyFwNGcFuAWiRZTkmtfIK1nz9Hkqp/eOcXmcA0f0tsfGH8yaYQn3WORENsoiO2ZYRQRmrStYuA1ycSFV9sMu2squc3r9F9tEYE4FQoq7hRtDirHZKVFIEw6uaoNcdM/KjpE+NbdA4xzFCC4fcQ8GRJjEQbnJ+CzSlusXZTv0jbSRlNascTFy6KvgQbcmmkzxheqYbZOwl1+OZ1TnshMNf4F8t7YNGIMAZ7CycrRQmawArucOF1/PreJ4DBpKqg8kv3gD4no37kk4fr6C6B/GogdR0vVxqdw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIJqQ-0002r9-7s for guix-patches@gnu.org; Mon, 02 Dec 2024 22:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74551] [PATCH rust-team v3 73/73] gnu: Add starship. Resent-From: Aaron Covrig Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Dec 2024 03:45:02 +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.173319745710891 (code B ref 74551); Tue, 03 Dec 2024 03:45:02 +0000 Received: (at 74551) by debbugs.gnu.org; 3 Dec 2024 03:44:17 +0000 Received: from localhost ([127.0.0.1]:57700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIJpg-0002pY-Aa for submit@debbugs.gnu.org; Mon, 02 Dec 2024 22:44:17 -0500 Received: from mail-qv1-f43.google.com ([209.85.219.43]:47184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIJpe-0002pL-3q for 74551@debbugs.gnu.org; Mon, 02 Dec 2024 22:44:15 -0500 Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-6d8a2d0588bso13611026d6.2 for <74551@debbugs.gnu.org>; Mon, 02 Dec 2024 19:44:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; t=1733197393; x=1733802193; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ewKB4YRBPbw26JIl4UbtOzepGUEVvWdNMtxcyvGVwBk=; b=b9GOPAaccQ5Sdl4S8i17PPekKnYmisvqsqHkqxbfseTeLl1xwudm9pod799M09pgFL kEXhpOdqL8wT+NJ2CkXJKwFt9mnN8OzaEi3e619NKkOsq2ATqm1nYq7QFJe9Cv5GD8Q+ 8OmjDtGEHhsRybPo9VibEPiwZQCg9rdzMtGRU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733197393; x=1733802193; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ewKB4YRBPbw26JIl4UbtOzepGUEVvWdNMtxcyvGVwBk=; b=HutIY3IiiPSv3qwzLPWPwcAauyE6ca59zhEMEANs8Nj/zOJMny5gaKOibIIkLo8CBP qhTy3BCO28dHSywpwq3ow0uh4VrEQFQQP9dorLQplTQh47ySsde4JT4UTmX1Tiizxv6Y B1QJiBk2a6TMdNGDCTtNoBxbhh1/7Mis2wIesElyLBJ8Kja99TEaVLIKGd5QAEVh2ZyT pDfa5OiopLoj7gPYPNEwS+RtdOwlCf7yijSbNvrvbsWwUF7GzaTLTNAt6YldGVGOEuRl vk4/blBhnOf+pGo2PIdZR7PSYlSnPl6yO2z2zHPXvqx2tUpugbG3EPZG78VZO95c9mgF Vurw== X-Gm-Message-State: AOJu0YwIL9SA2RDuZMdrbXxf1cAU1R8H+F5Z78hwhHfXmiuHZ3KGqP6s qmwNp0gFMwhvd628HLW95u/+bbAKAL6pdnCtbuB0l0MDpzsHDpfF1i+/g+oWi4IkjhBL2Q/0qpG Fu3WvL+z7yS26z3gQkJkO9bbfgUsqTCMPG6iiIMtDy1V62n5cqeKE4AZ4cRukTVhFWHM/HvE3Ea pMHABo5NKveCxfZ4I8GXX2rDcVzPCsvL+GazC+5NM= X-Gm-Gg: ASbGncs9/xG6mDWRODKCR5UPMC7Hu37v6gBxgDXz0kb1vdLqpbtBZWDJQz+0KMHHAl1 ICHkgYEQn/axhWNTCilA0OuLxDO6H05HjdrN4Mcmo7NRBGExhwohkSEzjNP3gmGI/NWHbld+Z08 t2vgVwlwozIucL6gD7WTqzD65satP4Flm1MRw9VqHHfDf1Iqs/ZfG9gzxsVjWCUOdin6oFLR7Js 4h88U+FD/RXi83ZfCmmurwolXj1BXZHx6pesMBJb8YBVMaM5kaZT+0ggS0bm29/Z8TxHgB+QN+q SFuWDj8qdgfPd7ANM8vdfo1F0NPRcQb23zLHWIyoS9a4skaP53A= X-Google-Smtp-Source: AGHT+IHv8BtT+tDdHzCaScjhaNL1r7Jq+funjfnMeoBgndo0NSoLaK5NgoTIEs3EueMf5rUnpnzV4A== X-Received: by 2002:ad4:5aa5:0:b0:6d8:8a01:64e2 with SMTP id 6a1803df08f44-6d8b7457e8fmr17716246d6.43.1733197393339; Mon, 02 Dec 2024 19:43:13 -0800 (PST) Received: from mobile-dev.fios-router.home (pool-71-244-152-222.bltmmd.fios.verizon.net. [71.244.152.222]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d8b2209244sm9175346d6.69.2024.12.02.19.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 19:43:12 -0800 (PST) Date: Mon, 2 Dec 2024 22:00:53 -0500 Message-ID: <20241203030059.1214554-74-aaron.covrig.us@ieee.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241203030059.1214554-1-aaron.covrig.us@ieee.org> References: <20241203030059.1214554-1-aaron.covrig.us@ieee.org> 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: , Reply-to: Aaron Covrig X-ACL-Warn: , Aaron Covrig via Guix-patches From: Aaron Covrig via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 0.35 X-Spam-Score: 0.35 X-Migadu-Queue-Id: 13E48671AA X-Migadu-Scanner: mx12.migadu.com X-TUID: l5p9rRufcTrq From: Jordan Moore * gnu/packages/shellutils.scm (starship): New variable. --- gnu/packages/crates-io.scm | 2 +- gnu/packages/shellutils.scm | 137 ++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 1 deletion(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index f453a7316e..655cef9696 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -78184,7 +78184,7 @@ (define-public rust-starship-battery-0.10 (home-page "https://github.com/starship/rust-battery") (synopsis "Cross-platform information about the notebook batteries") (description - "This package provides Cross-platform information about the notebook batteries.") + "This package provides Cross-platform information about notebook batteries.") (license license:isc))) (define-public rust-state-0.6 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.47.0