unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: Leo Famulari <leo@famulari.name>,
	Tobias Geerinckx-Rice <me@tobias.gr>,
	63420@debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo@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	[thread overview]
Message-ID: <20230510163925.3071-3-GNUtoo@cyberdimension.org> (raw)
In-Reply-To: <20230510163925.3071-1-GNUtoo@cyberdimension.org>

* 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@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





  parent reply	other threads:[~2023-05-10 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 16:34 [bug#63420] [PATCH v1 0/4] Guix patches for btrfs-progs Denis 'GNUtoo' Carikli
2023-05-10 16:39 ` [bug#63420] [PATCH v1 1/4] gnu: btrfs-progs: Run 'guix style' over the package Denis 'GNUtoo' Carikli
2023-05-10 16:39   ` [bug#63420] [PATCH v1 2/4] gnu: btrfs-progs: Use new style inputs and gexps Denis 'GNUtoo' Carikli
2023-05-10 16:39   ` Denis 'GNUtoo' Carikli [this message]
2023-05-10 16:39   ` [bug#63420] [PATCH v1 4/4] gnu: btrfs-progs: Update to 6.3 Denis 'GNUtoo' Carikli
2023-05-18 17:53 ` bug#63420: [PATCH v1 0/4] Guix patches for btrfs-progs Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230510163925.3071-3-GNUtoo@cyberdimension.org \
    --to=gnutoo@cyberdimension.org \
    --cc=63420@debbugs.gnu.org \
    --cc=leo@famulari.name \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).