unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#54618] [PATCH] gnu: lbzip2: Fix cross-compilation.
@ 2022-03-29  1:36 Brian Kubisiak
  2022-03-29  6:07 ` Liliana Marie Prikler
  2022-03-30  1:45 ` [bug#54618] [PATCH v2] " Brian Kubisiak
  0 siblings, 2 replies; 5+ messages in thread
From: Brian Kubisiak @ 2022-03-29  1:36 UTC (permalink / raw)
  To: 54618

* gnu/packages/compression.scm (lbzip2)[arguments]: Add (or
native-inputs inputs) to ASSOC-REF.
---
 gnu/packages/compression.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 3edaecd951..34e9fa49de 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -411,8 +411,8 @@ (define-public lbzip2
        `(#:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'unpack-gnulib
-             (lambda* (#:key inputs #:allow-other-keys)
-               (let ((gnulib (assoc-ref inputs "gnulib")))
+             (lambda* (#:key inputs native-inputs #:allow-other-keys)
+               (let ((gnulib (assoc-ref (or native-inputs inputs) "gnulib")))
                  (copy-recursively gnulib "lib")
                  (setenv "PATH" (string-append "lib:" (getenv "PATH")))
                  #t)))
-- 
2.34.0






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

* [bug#54618] [PATCH] gnu: lbzip2: Fix cross-compilation.
  2022-03-29  1:36 [bug#54618] [PATCH] gnu: lbzip2: Fix cross-compilation Brian Kubisiak
@ 2022-03-29  6:07 ` Liliana Marie Prikler
  2022-03-29  9:05   ` Maxime Devos
  2022-03-30  1:45 ` [bug#54618] [PATCH v2] " Brian Kubisiak
  1 sibling, 1 reply; 5+ messages in thread
From: Liliana Marie Prikler @ 2022-03-29  6:07 UTC (permalink / raw)
  To: Brian Kubisiak, 54618

Am Montag, dem 28.03.2022 um 18:36 -0700 schrieb Brian Kubisiak:
> * gnu/packages/compression.scm (lbzip2)[arguments]: Add (or
> native-inputs inputs) to ASSOC-REF.
> ---
>  gnu/packages/compression.scm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/compression.scm
> b/gnu/packages/compression.scm
> index 3edaecd951..34e9fa49de 100644
> --- a/gnu/packages/compression.scm
> +++ b/gnu/packages/compression.scm
> @@ -411,8 +411,8 @@ (define-public lbzip2
>         `(#:phases
>           (modify-phases %standard-phases
>             (add-after 'unpack 'unpack-gnulib
> -             (lambda* (#:key inputs #:allow-other-keys)
> -               (let ((gnulib (assoc-ref inputs "gnulib")))
> +             (lambda* (#:key inputs native-inputs #:allow-other-
> keys)
> +               (let ((gnulib (assoc-ref (or native-inputs inputs)
> "gnulib")))
>                   (copy-recursively gnulib "lib")
>                   (setenv "PATH" (string-append "lib:" (getenv
> "PATH")))
>                   #t)))
Note that referring to inputs by name is discouraged. In this case, the
gnulib origin should be inlined (see ppsspp or gnome-recipes for
examples on how that is done).  I don't think there is a native vs.
non-native distinction for origins, but if there is, simply use #+
instead of #$.

Cheers




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

* [bug#54618] [PATCH] gnu: lbzip2: Fix cross-compilation.
  2022-03-29  6:07 ` Liliana Marie Prikler
@ 2022-03-29  9:05   ` Maxime Devos
  0 siblings, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2022-03-29  9:05 UTC (permalink / raw)
  To: Liliana Marie Prikler, Brian Kubisiak, 54618

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

Liliana Marie Prikler schreef op di 29-03-2022 om 08:07 [+0200]:
> +             (lambda* (#:key inputs native-inputs #:allow-other-
> keys)
> +               (let ((gnulib (assoc-ref (or native-inputs inputs)
> "gnulib")))
>                   (copy-recursively gnulib "lib")
>                   (setenv "PATH" (string-append "lib:" (getenv
> "PATH")))
>                   #t)))
Note that referring to inputs by name is discouraged. In this case, the
gnulib origin should be inlined (see ppsspp or gnome-recipes for
examples on how that is done).  I don't think there is a native vs.
non-native distinction for origins, but if there is, simply use #+
instead of #$.

I would go with

  (let ((gnulib (dirname (search-input-file (or native-inputs inputs) "gnulib-tool.py"))))
    [...]).

That way, no input labels are used yet package transformations are
still possible:

  (package (inherit lbzip2) (native-inputs [some inputs with a different gnulib]))

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [bug#54618] [PATCH v2] gnu: lbzip2: Fix cross-compilation.
  2022-03-29  1:36 [bug#54618] [PATCH] gnu: lbzip2: Fix cross-compilation Brian Kubisiak
  2022-03-29  6:07 ` Liliana Marie Prikler
@ 2022-03-30  1:45 ` Brian Kubisiak
  2022-03-30 10:39   ` bug#54618: [PATCH] " Mathieu Othacehe
  1 sibling, 1 reply; 5+ messages in thread
From: Brian Kubisiak @ 2022-03-30  1:45 UTC (permalink / raw)
  To: 54618

* gnu/packages/compression.scm (lbzip2)[arguments]: Search (or
native-inputs inputs) for gnulib-tool.py.
---
 gnu/packages/compression.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 3edaecd951..e1d8f721a3 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -411,8 +411,10 @@ (define-public lbzip2
        `(#:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'unpack-gnulib
-             (lambda* (#:key inputs #:allow-other-keys)
-               (let ((gnulib (assoc-ref inputs "gnulib")))
+             (lambda* (#:key inputs native-inputs #:allow-other-keys)
+               (let ((gnulib
+                      (dirname (search-input-file (or native-inputs inputs)
+                                                  "gnulib-tool.py"))))
                  (copy-recursively gnulib "lib")
                  (setenv "PATH" (string-append "lib:" (getenv "PATH")))
                  #t)))
-- 
2.34.0






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

* bug#54618: [PATCH] gnu: lbzip2: Fix cross-compilation.
  2022-03-30  1:45 ` [bug#54618] [PATCH v2] " Brian Kubisiak
@ 2022-03-30 10:39   ` Mathieu Othacehe
  0 siblings, 0 replies; 5+ messages in thread
From: Mathieu Othacehe @ 2022-03-30 10:39 UTC (permalink / raw)
  To: Brian Kubisiak; +Cc: 54618-done


> * gnu/packages/compression.scm (lbzip2)[arguments]: Search (or
> native-inputs inputs) for gnulib-tool.py.

Pushed as 2387adf60022799a8af144ed8dd2b7a46c155374.

Thanks,

Mathieu




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

end of thread, other threads:[~2022-03-30 10:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-29  1:36 [bug#54618] [PATCH] gnu: lbzip2: Fix cross-compilation Brian Kubisiak
2022-03-29  6:07 ` Liliana Marie Prikler
2022-03-29  9:05   ` Maxime Devos
2022-03-30  1:45 ` [bug#54618] [PATCH v2] " Brian Kubisiak
2022-03-30 10:39   ` bug#54618: [PATCH] " Mathieu Othacehe

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