[bug#35244,1/6] gnu: bash-completion: Fix cross-compilation.

Message ID 20190412131556.25282-1-m.othacehe@gmail.com
State New
Headers show
Series
  • Fix some cross-compilation issues.
Related show

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Mathieu Othacehe April 12, 2019, 1:15 p.m. UTC
* gnu/packages/bash.scm (bash-completion)[arguments]: Search for util-linux in
native-inputs and inputs during "remove-redundant-completions" phase.
---
 gnu/packages/bash.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Ludovic Courtès April 14, 2019, 3:19 p.m. UTC | #1
Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> * gnu/packages/bash.scm (bash-completion)[arguments]: Search for util-linux in
> native-inputs and inputs during "remove-redundant-completions" phase.

LGTM!
Mathieu Othacehe June 25, 2019, 7:42 p.m. UTC | #2
> Mathieu Othacehe <m.othacehe@gmail.com> skribis:
>
>> * gnu/packages/bash.scm (bash-completion)[arguments]: Search for util-linux in
>> native-inputs and inputs during "remove-redundant-completions" phase.
>
> LGTM!

Pushed as d8dbfbce.

Sorry for the looong reaction.

Mathieu

Patch

diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index fb4e3f4be3..ef93a11085 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -4,6 +4,7 @@ 
 ;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -291,13 +292,16 @@  without modification.")
      `(#:phases (modify-phases %standard-phases
                   (add-after
                    'install 'remove-redundant-completions
-                   (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (lambda* (#:key
+                             inputs native-inputs
+                             outputs #:allow-other-keys)
                      ;; Util-linux comes with a bunch of completion files for
                      ;; its own commands which are more sophisticated and
                      ;; up-to-date than those of bash-completion.  Remove those
                      ;; from bash-completion.
                      (let* ((out         (assoc-ref outputs "out"))
-                            (util-linux  (assoc-ref inputs "util-linux"))
+                            (util-linux  (assoc-ref (or native-inputs inputs)
+                                                    "util-linux"))
                             (completions (string-append out
                                                         "/share/bash-completion"
                                                         "/completions"))