GNU bug report logs - #63420
[PATCH v1 0/4] Guix patches for btrfs-progs

Previous Next

Package: guix-patches;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Wed, 10 May 2023 16:35:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: Leo Famulari <leo <at> famulari.name>, Tobias Geerinckx-Rice <me <at> tobias.gr>, 63420 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [bug#63420] [PATCH v1 3/4] gnu: btrfs-progs: Make the python-sphinx input conditional.
Date: Wed, 10 May 2023 18:39:24 +0200
* 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: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
---
 gnu/packages/linux.scm | 42 ++++++++++++++++++++++++++++++------------
 1 file changed, 30 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a71100baab..e910c47ab9 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5894,9 +5894,18 @@ (define-public btrfs-progs
     (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)
@@ -5935,15 +5944,24 @@ (define-public btrfs-progs
                   `(,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 (member (%current-system)
+                  (package-transitive-supported-systems
+                   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
-- 
2.39.2





This bug report was last modified 2 years and 99 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.