Subject: [bug#71993] [PATCH core-updates 2/2] gnu: python-pyopenssl: Don't use libfaketime on 32bit systems.

From: Christopher Baines <[email-masked]>
Date: Mon, 8 Jul 2024 11:03:34 +0200

As it fails to build and doesn't seem to work.

* gnu/packages/python-pyopenssl.scm (python-pyopenssl)[arguments]: Only use
faketime on 64bit systems.
[native-inputs]: Only include libfaketime on 64bit systems.

Change-Id: I3a4ab85219ae71af17f43d864410fe2ac86ef214
---
 gnu/packages/python-crypto.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 78f65ccf87..b001bb3e19 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -662,7 +662,10 @@ (define-public python-pyopenssl
                 ;; PyOpenSSL runs tests against a certificate with a fixed
                 ;; expiry time.  To ensure successful builds in the future,
                 ;; set the time to roughly the release date.
-                (invoke "faketime" "2023-03-25" "pytest" "-vv" "-k"
+                (invoke #$@(if (target-64bit?)
+                               '("faketime" "2023-03-25")
+                               '())
+                        "pytest" "-vv" "-k"
                         (string-append
                          ;; This test tries to look up certificates from
                          ;; the compiled-in default path in OpenSSL, which
@@ -676,7 +679,10 @@ (define-public python-pyopenssl
                          "and not test_verify_with_time"))))))))
     (propagated-inputs (list python-cryptography))
     (inputs (list openssl))
-    (native-inputs (list libfaketime python-flaky python-pretend python-pytest))
+    (native-inputs `(,@(if (target-64bit?)
+                           (list libfaketime)
+                           '())
+                     ,@(list python-flaky python-pretend python-pytest)))
     (home-page "https://github.com/pyca/pyopenssl")
     (synopsis "Python wrapper module around the OpenSSL library")
     (description "PyOpenSSL is a high-level wrapper around a subset of the
-- 
2.45.2