unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24433: fish needs to have bc in propagated-inputs
@ 2016-09-14  8:48 Arun Isaac
  2016-09-14 13:57 ` Thompson, David
  0 siblings, 1 reply; 8+ messages in thread
From: Arun Isaac @ 2016-09-14  8:48 UTC (permalink / raw)
  To: 24433

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


'fish' needs 'bc' as a propagated input. I have noticed runtime errors
due to absence of bc. It's also mentioned here:

https://github.com/fish-shell/fish-shell#runtime-dependencies

Quoting the relevant paragraph:

"fish requires a number of utilities to operate, which should be present
on any Unix, GNU/Linux or OS X system. These include (but are not
limited to) hostname, grep, awk, sed, which, and getopt. fish also
requires the bc program."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* bug#24433: fish needs to have bc in propagated-inputs
  2016-09-14  8:48 bug#24433: fish needs to have bc in propagated-inputs Arun Isaac
@ 2016-09-14 13:57 ` Thompson, David
  2016-09-15  6:23   ` Arun Isaac
  2016-09-16 21:00   ` bug#24433: Arun Isaac
  0 siblings, 2 replies; 8+ messages in thread
From: Thompson, David @ 2016-09-14 13:57 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 24433

On Wed, Sep 14, 2016 at 4:48 AM, Arun Isaac <arunisaac@systemreboot.net> wrote:
>
> 'fish' needs 'bc' as a propagated input. I have noticed runtime errors
> due to absence of bc. It's also mentioned here:
>
> https://github.com/fish-shell/fish-shell#runtime-dependencies
>
> Quoting the relevant paragraph:
>
> "fish requires a number of utilities to operate, which should be present
> on any Unix, GNU/Linux or OS X system. These include (but are not
> limited to) hostname, grep, awk, sed, which, and getopt. fish also
> requires the bc program."

A runtime dependency does *not* mean that an input should be
propagated.  Propagation is a solution of last resort.

Instead, try finding the places where 'bc' is referenced in the fish
source and replace it with the absolute path to the binary.

Thanks,

- Dave

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

* bug#24433: fish needs to have bc in propagated-inputs
  2016-09-14 13:57 ` Thompson, David
@ 2016-09-15  6:23   ` Arun Isaac
  2016-09-16 21:00   ` bug#24433: Arun Isaac
  1 sibling, 0 replies; 8+ messages in thread
From: Arun Isaac @ 2016-09-15  6:23 UTC (permalink / raw)
  To: Thompson, David; +Cc: 24433

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


> Instead, try finding the places where 'bc' is referenced in the fish
> source and replace it with the absolute path to the binary.

Ok, I'll try to do that.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* bug#24433:
  2016-09-14 13:57 ` Thompson, David
  2016-09-15  6:23   ` Arun Isaac
@ 2016-09-16 21:00   ` Arun Isaac
  2016-09-16 21:00     ` bug#24433: [PATCH] gnu: fish: Add input bc Arun Isaac
  1 sibling, 1 reply; 8+ messages in thread
From: Arun Isaac @ 2016-09-16 21:00 UTC (permalink / raw)
  To: 24433


I have replaced invocations of bc with its absolute path in the files
share/functions/math.fish and share/functions/seq.fish. Please review patch
and suggest improvements if any.

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

* bug#24433: [PATCH] gnu: fish: Add input bc.
  2016-09-16 21:00   ` bug#24433: Arun Isaac
@ 2016-09-16 21:00     ` Arun Isaac
  2016-09-25 22:07       ` Arun Isaac
  2016-10-04  9:27       ` Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Arun Isaac @ 2016-09-16 21:00 UTC (permalink / raw)
  To: 24433

* gnu/packages/shells.scm (fish)[inputs]: Add bc.
---
 gnu/packages/shells.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 183ef7f..bc43468 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -22,6 +22,7 @@
 
 (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 documentation)
@@ -94,11 +95,21 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).")
     (native-inputs
      `(("doxygen" ,doxygen)))
     (inputs
-     `(("ncurses" ,ncurses)
+     `(("bc" ,bc)
+       ("ncurses" ,ncurses)
        ("python" ,python-wrapper)))   ;for fish_config and manpage completions
     (arguments
      '(#:tests? #f ; no check target
-       #:configure-flags '("--sysconfdir=/etc")))
+       #:configure-flags '("--sysconfdir=/etc")
+       #:phases
+       (modify-phases %standard-phases
+         ;; Replace bc by its absolute path in the store
+         (add-after 'unpack 'patch-bc
+           (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"))))))))
     (synopsis "The friendly interactive shell")
     (description
      "Fish (friendly interactive shell) is a shell focused on interactive use,
-- 
2.10.0

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

* bug#24433: [PATCH] gnu: fish: Add input bc.
  2016-09-16 21:00     ` bug#24433: [PATCH] gnu: fish: Add input bc Arun Isaac
@ 2016-09-25 22:07       ` Arun Isaac
  2016-10-04  9:27       ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Arun Isaac @ 2016-09-25 22:07 UTC (permalink / raw)
  To: 24433

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


To reproduce this bug, run `math 1 + 1` in the fish shell. You should
get an error saying that 'bc' is an unknown command. With the patch I
supplied, this error will not occur.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* bug#24433: [PATCH] gnu: fish: Add input bc.
  2016-09-16 21:00     ` bug#24433: [PATCH] gnu: fish: Add input bc Arun Isaac
  2016-09-25 22:07       ` Arun Isaac
@ 2016-10-04  9:27       ` Ludovic Courtès
  2016-10-04 14:19         ` Arun Isaac
  1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2016-10-04  9:27 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 24433-done

Arun Isaac <arunisaac@systemreboot.net> skribis:

> * gnu/packages/shells.scm (fish)[inputs]: Add bc.

Pushed as a8d3bc473d2cd285f03989be8f558c25a7cbd6c9, thanks!

Ludo’.

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

* bug#24433: [PATCH] gnu: fish: Add input bc.
  2016-10-04  9:27       ` Ludovic Courtès
@ 2016-10-04 14:19         ` Arun Isaac
  0 siblings, 0 replies; 8+ messages in thread
From: Arun Isaac @ 2016-10-04 14:19 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 24433-done

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


> Pushed as a8d3bc473d2cd285f03989be8f558c25a7cbd6c9, thanks!

Great! Thank you!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

end of thread, other threads:[~2016-10-04 14:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-14  8:48 bug#24433: fish needs to have bc in propagated-inputs Arun Isaac
2016-09-14 13:57 ` Thompson, David
2016-09-15  6:23   ` Arun Isaac
2016-09-16 21:00   ` bug#24433: Arun Isaac
2016-09-16 21:00     ` bug#24433: [PATCH] gnu: fish: Add input bc Arun Isaac
2016-09-25 22:07       ` Arun Isaac
2016-10-04  9:27       ` Ludovic Courtès
2016-10-04 14:19         ` Arun Isaac

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).