guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/15: gnu: btrfs-progs: Make the python-sphinx input conditional.


From: guix-commits
Subject: 08/15: gnu: btrfs-progs: Make the python-sphinx input conditional.
Date: Thu, 18 May 2023 14:07:08 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 92a899ed985c60ffc199d8465ddbc03d285365ce
Author: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
AuthorDate: Wed May 10 18:39:24 2023 +0200

    gnu: btrfs-progs: Make the python-sphinx input conditional.
    
    * gnu/packages/linux.scm (btrfs-progs) [native-inputs]:
      Make the python-sphinx input conditional.
      [arguments]: Conditionally add --disable-documentation to
      configure flags.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/packages/linux.scm | 39 +++++++++++++++++++++++++++------------
 1 file changed, 27 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a0248106b6..38d7a041e0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5927,9 +5927,18 @@ and copy/paste text in the console and in xterm.")
     (arguments
      (list
       #:configure-flags
-      ;; The ‘Python support’ was never actually installed by previous
-      ;; versions of this package, but did prevent cross-compilation.
-      #~(list "--disable-python")
+      #~(append
+         ;; Without --disable-documentation, it complains about missing
+         ;; python-sphinx on systems where this package isn't available
+         ;; (because it requires Rust).
+         (if #$@(member (%current-system)
+                        (package-transitive-supported-systems
+                         python-sphinx))
+             '()
+             (list "--disable-documentation"))
+         ;; The ‘Python support’ was never actually installed by previous
+         ;; versions of this package, but did prevent cross-compilation.
+         (list "--disable-python"))
       #:phases #~(modify-phases %standard-phases
                    (add-after 'unpack 'patch-makefile
                      (lambda* (#:key outputs #:allow-other-keys)
@@ -5968,15 +5977,21 @@ and copy/paste text in the console and in xterm.")
                   `(,zlib "static")
                   `(,zstd "lib")
                   `(,zstd "static")))
-    (native-inputs (list pkg-config
-                         python-sphinx            ;for building documentation
-                         acl                      ;for tests
-                         lvm2                     ;for dmsetup
-                         grep                     ;need Perl regexp support
-                         libaio
-                         liburing
-                         util-linux               ;for fallocate
-                         which))
+    (native-inputs
+     (append
+      ;; For building documentation.  Since python-sphinx requires Rust, add
+      ;; it conditionally depending on such support.
+      (if (supported-package? python-sphinx)
+          (list python-sphinx)
+          '())
+      (list pkg-config
+            acl                                   ;for tests
+            lvm2                                  ;for dmsetup
+            grep                                  ;need Perl regexp support
+            libaio
+            liburing
+            util-linux                            ;for fallocate
+            which)))
     (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page";)
     (synopsis "Create and manage btrfs copy-on-write file systems")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]