From patchwork Wed Dec 20 15:50:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain GARBAGE X-Patchwork-Id: 57938 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3C73B27BBEA; Wed, 20 Dec 2023 22:10:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 29D1527BBE2 for ; Wed, 20 Dec 2023 22:10:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rG4lN-0003DB-LR; Wed, 20 Dec 2023 17:10:01 -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 1rG4lL-0003CJ-Bw for guix-patches@gnu.org; Wed, 20 Dec 2023 17:09:59 -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 1rG4lL-0000jL-3p for guix-patches@gnu.org; Wed, 20 Dec 2023 17:09:59 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rG4lO-0002ir-7n for guix-patches@gnu.org; Wed, 20 Dec 2023 17:10:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67942] [PATCH] gnu: Add liquidprompt. Resent-From: Romain GARBAGE Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 20 Dec 2023 22:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67942 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67942@debbugs.gnu.org Cc: Romain GARBAGE X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170311015410386 (code B ref -1); Wed, 20 Dec 2023 22:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Dec 2023 22:09:14 +0000 Received: from localhost ([127.0.0.1]:41972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rG4kZ-0002hO-V3 for submit@debbugs.gnu.org; Wed, 20 Dec 2023 17:09:13 -0500 Received: from lists.gnu.org ([2001:470:142::17]:38238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFyqf-0003CW-GP for submit@debbugs.gnu.org; Wed, 20 Dec 2023 10:51:09 -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 1rFyqU-0000uf-Q6 for guix-patches@gnu.org; Wed, 20 Dec 2023 10:50:54 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFyqQ-0004uu-W0 for guix-patches@gnu.org; Wed, 20 Dec 2023 10:50:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=dmpVEIM/tj6PiIgyaQnve6ItUhlS0K1P0wNwkYj+xEk=; b=b2o6dXxEAKuGUvAnB9JErqG8Clv8kdBcOL7LloejmnHh+rMDnEw2Ve5V 8uy8jkKay06etxq8mF+GstJ1yPTKHhqjHAI9lQX/TJJjsQQj8YRebDqOr B7G9eyuiLQKmQDqrBMrGLPk3LrStKt5e29VXK/US9J77iSTPbUTORjqRU I=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=romain.garbage@inria.fr; spf=None smtp.helo=postmaster@guix-A102.bordeaux.inria.fr Received-SPF: SoftFail (mail3-relais-sop.national.inria.fr: domain of romain.garbage@inria.fr is inclined to not designate 193.50.110.57 as permitted sender) identity=mailfrom; client-ip=193.50.110.57; receiver=mail3-relais-sop.national.inria.fr; envelope-from="romain.garbage@inria.fr"; x-sender="romain.garbage@inria.fr"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 include:mailout.safebrands.com a:basic-mail.safebrands.com a:basic-mail02.safebrands.com ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160 ip4:89.107.174.7 mx ~all" Received-SPF: None (mail3-relais-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@guix-A102.bordeaux.inria.fr) identity=helo; client-ip=193.50.110.57; receiver=mail3-relais-sop.national.inria.fr; envelope-from="romain.garbage@inria.fr"; x-sender="postmaster@guix-A102.bordeaux.inria.fr"; x-conformance=spf_only X-IronPort-AV: E=Sophos;i="6.04,291,1695679200"; d="scan'208";a="74983063" Received: from unknown (HELO guix-A102.bordeaux.inria.fr) ([193.50.110.57]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 16:50:47 +0100 From: Romain GARBAGE Date: Wed, 20 Dec 2023 16:50:34 +0100 Message-ID: <20231220155036.12229-1-romain.garbage@inria.fr> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=192.134.164.104; envelope-from=romain.garbage@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 20 Dec 2023 17:09:10 -0500 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/shellutils.scm (liquidprompt): New variable. Change-Id: I0004568df6dd6011f5e65c9894ce97a8c2533f84 --- gnu/packages/shellutils.scm | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 671848fd27..4288d5362a 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -791,3 +791,65 @@ (define-public grc @end example ") (license license:gpl2))) + +(define-public liquidprompt + (package + (name "liquidprompt") + (version "2.1.2") + (home-page "https://github.com/liquidprompt/liquidprompt") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/liquidprompt/liquidprompt") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ljlq97mh84d6g6r3abb254vrwrdan5v74b69fpd62d7p9ffnsgf")))) + (build-system copy-build-system) + (arguments + (list + #:install-plan #~'(("liquidpromptrc-dist" "etc/liquidpromptrc") + ("example.bashrc" "share/liquidprompt/examples/") + ("liquid.ps1" "share/liquidprompt/examples/") + ("liquidprompt" "share/liquidprompt/") + ("contrib" "share/liquidprompt/") + ("themes" "share/liquidprompt/") + ("liquidprompt.plugin.zsh" + "share/zsh/plugins/liquidprompt/") + ("docs" #$(string-append "share/doc/" name "-" + version "/"))) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'fix-plugin + (lambda _ + (substitute* "liquidprompt.plugin.zsh" + (("source(.*)$") + (string-append "source " + #$output + "/share/liquidprompt/liquidprompt"))))) + (add-after 'fix-plugin 'fix-tput-path + (lambda _ + (substitute* "liquidprompt" + (("([ (])tput " all beg) (string-append beg #$ncurses "/bin/tput ")))))))) + (synopsis "Full-featured prompt for Bash & Zsh") + (description + "Liquidprompt is an adaptive prompt for Bash and Zsh that gives +you a nicely displayed prompt with useful information when you need it. It +does this with a powerful theming engine and a large array of data sources. + +In order to use liquidprompt with Zsh, you should use the following snippet +with @code{guix home}: +@example +(services (list ;;... + (service home-zsh-service-type + (home-zsh-configuration + (zshrc (list ;;... + ;; This loads liquidprompt + (mixed-text-file \"liquidprompt\" + \"[[ $- = *i* ]] && source \" liquidprompt \"/share/liquidprompt/liquidprompt\") + ;; This loads the powerline theme available in liquidprompt + (mixed-text-file \"powerline-theme\" + \"source \" liquidprompt \"/share/liquidprompt/themes/powerline/powerline.theme\"))))))) +@end example +") + (license license:agpl3)))