diff mbox series

[bug#49025,[PATCH,v2,core-updates] 12/37] libgcrypt: Fix cross-compilation build error.

Message ID 20210618160936.18972-12-maximedevos@telenet.be
State Accepted
Headers show
Series [bug#49025,[PATCH,v2,core-updates] 12/37] libgcrypt: Fix cross-compilation build error. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

M June 18, 2021, 4:09 p.m. UTC
When cross-compiling a package using gnu-build-system,
%build-inputs does not exist. But libgcrypt uses %build-inputs
anyway. Fix it.

* gnu/packages/gnupg.scm
  (libgcrypt)[arguments]<#:configure-flags>: Make this a G-exp
  instead of a raw S-exp. Eliminate %build-inputs and use
  this-package-input instead.
---
 gnu/packages/gnupg.scm | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 1fee30584c..35cfdf6f43 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -74,6 +74,7 @@ 
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
@@ -169,11 +170,12 @@  Daemon and possibly more in the future.")
      ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
      ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
      `(#:configure-flags
-       (list (string-append "--with-gpg-error-prefix="
-                            (assoc-ref %build-inputs "libgpg-error-host"))
-             ;; When cross-compiling, _gcry_mpih_lshift etc are undefined
-             ,@(if (%current-target-system) '("--disable-asm")
-                   '()))))
+       ,#~(list (string-append "--with-gpg-error-prefix="
+                               #$(this-package-input "libgpg-error-host"))
+                ;; When cross-compiling, _gcry_mpih_lshift etc are undefined
+                #$@(if (%current-target-system)
+                       #~("--disable-asm")
+                       #~()))))
     (outputs '("out" "debug"))
     (home-page "https://gnupg.org/")
     (synopsis "Cryptographic function library")