summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-04-18 10:41:28 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-04-18 11:23:47 -0400
commit813d670b151b06181fd045d6e00104f3da63f4a0 (patch)
treefaa7ff881400429464757a5b5288f10a386f9510
parent04cccedba548a16e7b5edab75d077c7dadb53d98 (diff)
gnu: samba: Make the python-cryptography input conditional.
* gnu/packages/samba.scm (samba) [arguments]: Conditionally enable self tests in configure phase. [native-inputs]: Conditionally add python-cryptography. * gnu/packages/samba.scm (samba/pinned) [native-inputs]: Likewise. Reported-by: John Kehayias <john.kehayias@protonmail.com>
-rw-r--r--gnu/packages/samba.scm79
1 files changed, 51 insertions, 28 deletions
diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm
index da103ed839..e09acf49f9 100644
--- a/gnu/packages/samba.scm
+++ b/gnu/packages/samba.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
-;;; Copyright © 2020, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
@@ -206,7 +206,11 @@ external dependencies.")
(lambda* (#:key inputs #:allow-other-keys)
(let* ((libdir (string-append #$output "/lib")))
(invoke "./configure"
- "--enable-selftest"
+ #$@(if (member (%current-system)
+ (package-transitive-supported-systems
+ python-cryptography))
+ '("--enable-selftest")
+ '())
"--enable-fhs"
(string-append "--prefix=" #$output)
"--sysconfdir=/etc"
@@ -250,19 +254,27 @@ external dependencies.")
;; In Requires or Requires.private of pkg-config files.
(list ldb talloc tevent))
(native-inputs
- (list perl-parse-yapp
- pkg-config
- python-cryptography ;for krb5 tests
- python-dnspython
- python-iso8601
- python-markdown
- rpcsvc-proto ;for 'rpcgen'
- python-pyasn1 ;for krb5 tests
- ;; For generating man pages.
- docbook-xml-4.2
- docbook-xsl-next ;otherwise the man pages are corrupted
- libxslt
- libxml2)) ;for XML_CATALOG_FILES
+ (append
+ (list perl-parse-yapp
+ pkg-config)
+ ;; The python-cryptography dependency is needed for the krb5 tests.
+ ;; Since python-cryptography requires Rust, add it conditionally
+ ;; depending on such support.
+ (if (member (%current-system)
+ (package-transitive-supported-systems
+ python-cryptography))
+ (list python-cryptography)
+ '())
+ (list python-dnspython
+ python-iso8601
+ python-markdown
+ rpcsvc-proto ;for 'rpcgen'
+ python-pyasn1 ;for krb5 tests
+ ;; For generating man pages.
+ docbook-xml-4.2
+ docbook-xsl-next ;otherwise the man pages are corrupted
+ libxslt
+ libxml2))) ;for XML_CATALOG_FILES
(home-page "https://www.samba.org/")
(synopsis
"The standard Windows interoperability suite of programs for GNU and Unix")
@@ -291,20 +303,31 @@ Desktops into Active Directory environments using the winbind daemon.")
"samba-" version ".tar.gz"))
(sha256
(base32 "1nrp85aya0pbbqdqjaqcw82cnzzys16yls37hi2h6mci8d09k4si"))))
+ ;; Note: this is duplicated from samba for robustness annd because
+ ;; docbook-xsl (rather than docbook-xsl-next) is used.
(native-inputs
- (list perl-parse-yapp
- pkg-config
- python-cryptography ;for krb5 tests
- python-dnspython
- python-iso8601
- python-markdown
- rpcsvc-proto ;for 'rpcgen'
- python-pyasn1 ;for krb5 tests
- ;; For generating man pages.
- docbook-xml-4.2
- docbook-xsl
- libxslt
- libxml2)))))
+ (append
+ (list perl-parse-yapp
+ pkg-config)
+ ;; The python-cryptography dependency is needed for the krb5 tests.
+ ;; Since python-cryptography requires Rust, add it conditionally
+ ;; depending on such support.
+ (if (member (%current-system)
+ (package-transitive-supported-systems
+ python-cryptography))
+ (list python-cryptography)
+ '())
+ (list python-dnspython
+ python-iso8601
+ python-markdown
+ rpcsvc-proto ;for 'rpcgen'
+ python-pyasn1 ;for krb5 tests
+ ;; For generating man pages.
+ docbook-xml-4.2
+ docbook-xsl ;otherwise the man pages are corrupted
+ libxslt
+ libxml2)))))) ;for XML_CATALOG_FILES
+
(define-public samba/fixed
(package