diff mbox series

[bug#49025,v3,core-updates,30/37] glib: Verify the cross-compiled python is used in installed scripts.

Message ID 20210618171631.20534-30-maximedevos@telenet.be
State Accepted
Headers show
Series [bug#49025,v3,core-updates,01/37] utils: Define target-linux? predicate. | expand

Checks

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

Commit Message

M June 18, 2021, 5:16 p.m. UTC
* gnu/packages/glib.scm (glib)[arguments]<#:disallowed-references>:
  Disallow the native python when cross-compiling.
---
 gnu/packages/glib.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 25c5ae494b..244544ea6f 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -77,6 +77,8 @@ 
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
+  #:use-module (srfi srfi-26)
   #:use-module ((srfi srfi-1) #:hide (zip))
 
   ;; Export variables up-front to allow circular dependency with the 'xorg'
@@ -200,7 +202,15 @@  shared NFS home directories.")
     (outputs '("out"   ; everything
                "bin")) ; glib-mkenums, gtester, etc.; depends on Python
     (arguments
-     `(#:disallowed-references (,tzdata-for-tests)
+     `(#:disallowed-references
+       (,tzdata-for-tests
+        ;; Verify glib-mkenums, gtester, ... use the cross-compiled
+        ;; python.
+        ,@(if (%current-target-system)
+              (map (cut gexp-input <> #:native? #t)
+                   `(,(this-package-native-input "python")
+                     ,(this-package-native-input "python-wrapper")))
+              '()))
        #:configure-flags '("-Dman=true"
                            "-Dselinux=disabled")
        #:phases