unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25467: Fish: some script is broken
@ 2017-01-17 10:51 ng0
       [not found] ` <handler.25467.B.14846503643976.ack@debbugs.gnu.org>
  2017-01-22  9:20 ` bug#25467: Fixed Ricardo Wurmus
  0 siblings, 2 replies; 4+ messages in thread
From: ng0 @ 2017-01-17 10:51 UTC (permalink / raw)
  To: 25467

Seems like a feature of our fish is currently broken, this is at
the first start, just after guix package -i fish (and no config
files present, all sitting in backups):

> fish
fish: Unknown command 'python -B /gnu/store/f80pivij8kfn1r49k2a3194kic3yhv7g-fish-2.4.0/share/fish/tools/create_manpage_completions.py --manpath --progress --cleanup-in ~/.config/fish/completions --cleanup-in ~/.config/fish/generated_completions'
/gnu/store/f80pivij8kfn1r49k2a3194kic3yhv7g-fish-2.4.0/share/fish/functions/fish_update_completions.fish (line 2):      python -B $__fish_datadir/tools/create_manpage_completions.py --manpath --progress --cleanup-in '~/.config/fish/completions' --cleanup-in '~/.config/fish/generated_completions'
                                                                                                                        ^
in function 'fish_update_completions'
        called on standard input

-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#25467: Acknowledgement (Fish: some script is broken)
       [not found] ` <handler.25467.B.14846503643976.ack@debbugs.gnu.org>
@ 2017-01-21 17:14   ` ng0
  2017-01-21 22:04     ` Ricardo Wurmus
  0 siblings, 1 reply; 4+ messages in thread
From: ng0 @ 2017-01-21 17:14 UTC (permalink / raw)
  To: 25467

FYI:
The script which fails is the one which generates completions
from man pages. As our location of manpages differs, we need some
approach to patch this.
-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#25467: Acknowledgement (Fish: some script is broken)
  2017-01-21 17:14   ` bug#25467: Acknowledgement (Fish: some script is broken) ng0
@ 2017-01-21 22:04     ` Ricardo Wurmus
  0 siblings, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2017-01-21 22:04 UTC (permalink / raw)
  To: ng0; +Cc: 25467

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]


ng0 <contact.ng0@cryptolab.net> writes:

> FYI:
> The script which fails is the one which generates completions
> from man pages. As our location of manpages differs, we need some
> approach to patch this.

I don’t think this is true.  Fish seems to fail to find “python”.  The
error disappears in an environment where “python-wrapper” is available.
A fix would involve replacing the call to “python” with the full path to
the “python” executable.

Here’s a patch:


[-- Attachment #2: 0001-gnu-fish-Embed-full-path-to-Python.patch --]
[-- Type: text/x-patch, Size: 2020 bytes --]

From dbc045eb338b7e70645ed19be71d8e761762c738 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sat, 21 Jan 2017 22:57:12 +0100
Subject: [PATCH] gnu: fish: Embed full path to Python.

Fixes <https://bugs.gnu.org/25467>.

* gnu/packages/shells.scm (fish)[arguments]: Rename phase "patch-bc" to
"embed-store-paths"; embed full path to Python.
---
 gnu/packages/shells.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 5237e8120..16c76ef66 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016 Stefan Reichör <stefan@xsteve.at>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -106,14 +107,17 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).")
        #:configure-flags '("--sysconfdir=/etc")
        #:phases
        (modify-phases %standard-phases
-         ;; Replace 'bc' by its absolute file name in the store.
-         (add-after 'unpack 'patch-bc
+         ;; 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"))))))))
+                               "/bin/bc")))
+             (substitute* "share/functions/fish_update_completions.fish"
+               (("python") (which "python")))
+             #t)))))
     (synopsis "The friendly interactive shell")
     (description
      "Fish (friendly interactive shell) is a shell focused on interactive use,
-- 
2.11.0


[-- Attachment #3: Type: text/plain, Size: 91 bytes --]



-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#25467: Fixed
  2017-01-17 10:51 bug#25467: Fish: some script is broken ng0
       [not found] ` <handler.25467.B.14846503643976.ack@debbugs.gnu.org>
@ 2017-01-22  9:20 ` Ricardo Wurmus
  1 sibling, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2017-01-22  9:20 UTC (permalink / raw)
  To: 25467-done

Fixed as of 79f3e82bd.
-- 
Ricardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-22  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17 10:51 bug#25467: Fish: some script is broken ng0
     [not found] ` <handler.25467.B.14846503643976.ack@debbugs.gnu.org>
2017-01-21 17:14   ` bug#25467: Acknowledgement (Fish: some script is broken) ng0
2017-01-21 22:04     ` Ricardo Wurmus
2017-01-22  9:20 ` bug#25467: Fixed Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).