From: Meiyo Peng <meiyo.peng@gmail.com>
To: 34003@debbugs.gnu.org
Subject: bug#34003: [PATCH] gnu: fish: Update to 3.0.0.
Date: Mon, 07 Jan 2019 10:42:36 +0800 [thread overview]
Message-ID: <875zv1rxwj.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 507 bytes --]
Hi,
This patch updates fish shell to 3.0.0.
I tested this patch on my computer. It seems bug#30265
(https://lists.gnu.org/archive/html/bug-guix/2018-01/msg00296.html) has
gone.
* gnu/packages/shells.scm (fish): Update to 3.0.0.
[source]: Remove dead URL.
[inputs]: Remove bc. Replace python-wrapper with python.
[arguments]: Remove configure-flags. Add multiple phases to patch fish.
Enable fish to source /etc/fish/config.sh. Add user's and system's guix
profiles to __extra_* variables.
[-- Attachment #2: 0001-gnu-fish-Update-to-3.0.0.patch --]
[-- Type: text/x-patch, Size: 6922 bytes --]
From 204527a56b31174777c6eee6512a7aaaacbcffe6 Mon Sep 17 00:00:00 2001
From: Meiyo Peng <meiyo.peng@gmail.com>
Date: Sun, 6 Jan 2019 22:11:36 +0800
Subject: [PATCH] gnu: fish: Update to 3.0.0.
* gnu/packages/shells.scm (fish): Update to 3.0.0.
[source]: Remove dead URL.
[inputs]: Remove bc. Replace python-wrapper with python.
[arguments]: Remove configure-flags. Add multiple phases to patch fish.
Enable fish to source /etc/fish/config.sh. Add user's and system's guix
profiles to __extra_* variables.
---
gnu/packages/shells.scm | 104 ++++++++++++++++++++++++++--------------
1 file changed, 68 insertions(+), 36 deletions(-)
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 38eeaa783..c9511fba6 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2017, 2018 Nils Gillmann <ng0@n0.is>
;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2019 Meiyo Peng <meiyo.peng@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,7 +28,6 @@
(define-module (gnu packages shells)
#:use-module (gnu packages)
- #:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
@@ -88,51 +88,83 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).")
(define-public fish
(package
(name "fish")
- (version "2.7.1")
- (source (origin
- (method url-fetch)
- (uri
- (list
- (string-append "https://fishshell.com/files/"
- version "/fish-" version ".tar.gz")
- (string-append "https://github.com/fish-shell/fish-shell/"
- "releases/download/" version "/"
- name "-" version ".tar.gz")))
- (sha256
- (base32
- "0nhc3yc5lnnan7zmxqqxm07rdpwjww5ijy45ll2njdc6fnfb2az4"))
- (modules '((guix build utils)))
- ;; Don't try to install /etc/fish/config.fish.
- (snippet '(begin
- (substitute* "Makefile.in"
- ((".*INSTALL.*sysconfdir.*fish.*") ""))
- #t))))
+ (version "3.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/fish-shell/fish-shell/"
+ "releases/download/" version "/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1kzjd0n0sfslkd36lzrvvvgy3qwkd9y466bkrqlnhd5h9dhx77ga"))))
(build-system gnu-build-system)
+ (inputs
+ `(("ncurses" ,ncurses)
+ ("groff" ,groff) ; for 'fish --help'
+ ("pcre2" ,pcre2) ; don't use the bundled PCRE2
+ ("python" ,python))) ; for fish_config and manpage completions
(native-inputs
`(("doxygen" ,doxygen)))
- (inputs
- `(("bc" ,bc)
- ("ncurses" ,ncurses)
- ("groff" ,groff) ;for 'fish --help'
- ("pcre2" ,pcre2) ;don't use the bundled PCRE2
- ("python" ,python-wrapper))) ;for fish_config and manpage completions
(arguments
- '(#:tests? #f ; no check target
- #:configure-flags '("--sysconfdir=/etc")
+ '(#:tests? #f ; no check target
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda _
+ (substitute* '("build_tools/build_commands_hdr.sh"
+ "build_tools/build_user_doc.sh")
+ (("/usr/bin/env") "env"))
+ #t))
;; Embed absolute paths to store items.
(add-after 'unpack 'embed-store-paths
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* '("share/functions/math.fish"
- "share/functions/seq.fish")
- (("\\| bc")
- (string-append "| " (assoc-ref %build-inputs "bc")
- "/bin/bc")))
- (substitute* "share/functions/fish_update_completions.fish"
- (("python") (which "python")))
+ (lambda _
+ (substitute* '("share/functions/__fish_config_interactive.fish"
+ "share/functions/fish_config.fish"
+ "share/functions/fish_update_completions.fish")
+ (("python3") (which "python3")))
(substitute* "share/functions/__fish_print_help.fish"
(("nroff") (which "nroff")))
+ #t))
+ ;; Source /etc/fish/config.fish from etc/fish/config.fish.
+ ;; TODO: Generate /etc/fish/config.fish to setup Guix environment
+ ;; variables. Similar to /etc/profile.
+ (add-before 'install 'patch-fish-config
+ (lambda _
+ (let ((port (open-file "etc/config.fish" "a")))
+ (display (string-append
+ "\n\n"
+ "# Added by Guix.\n"
+ "if test -f /etc/fish/config.fish\n"
+ " source /etc/fish/config.fish\n"
+ "end\n")
+ port)
+ (close-port port))
+ #t))
+ ;; Add user's and system's guix profiles to __extra_* variables.
+ (add-before 'install 'patch-fish-extra-paths
+ (lambda _
+ (let ((port (open-file "share/__fish_build_paths.fish" "a")))
+ (display
+ (string-append
+ "\n\n"
+ "# Added by Guix.\n"
+ "set -l __guix_profile_paths ~/.guix-profile "
+ "/run/current-system/profile\n"
+ "set __extra_completionsdir "
+ "$__guix_profile_paths\"/etc/fish/completions\" "
+ "$__guix_profile_paths\"/share/fish/vendor_completions.d\" "
+ "$__extra_completionsdir\n"
+ "set __extra_functionsdir "
+ "$__guix_profile_paths\"/etc/fish/functions\" "
+ "$__guix_profile_paths\"/share/fish/vendor_functions.d\" "
+ "$__extra_functionsdir\n"
+ "set __extra_confdir "
+ "$__guix_profile_paths\"/etc/fish/conf.d\" "
+ "$__guix_profile_paths\"/share/fish/vendor_conf.d\" "
+ "$__extra_confdir\n")
+ port)
+ (close-port port))
#t)))))
(synopsis "The friendly interactive shell")
(description
--
2.20.1
[-- Attachment #3: Type: text/plain, Size: 42 bytes --]
--
Meiyo Peng
https://www.pengmeiyu.com/
next reply other threads:[~2019-01-07 2:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 2:42 Meiyo Peng [this message]
[not found] ` <handler.34003.B.15468290014745.ack@debbugs.gnu.org>
2019-01-20 14:42 ` bug#34003: ([PATCH] gnu: fish: Update to 3.0.0.) Meiyo Peng
2019-01-20 15:00 ` Meiyo Peng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zv1rxwj.fsf@gmail.com \
--to=meiyo.peng@gmail.com \
--cc=34003@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.