gnu: cryptsetup: Only use ruby-asciidoctor on supported systems.

* gnu/packages/cryptsetup.scm (cryptsetup)[native-inputs]: Only use
ruby-asciidoctor on supported systems.
[arguments]: When building without ruby-asciidoctor adjust the
configure-flags.

Change-Id: If4551833de3c5b5a28424c059644e9fa7fda5abd
This commit is contained in:
Efraim Flashner 2024-03-10 10:46:31 +02:00 committed by Ludovic Courtès
parent 0933b6b86b
commit f48ecef7bd
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2,6 +2,7 @@
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 20192021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 20192021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2024 Efraim Flashner <efraim@flashner.co.il>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -49,23 +50,30 @@
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:configure-flags `(#:configure-flags
(list (append
;; Argon2 is always enabled, this just selects the (faster) full version. (if (assoc-ref %build-inputs "ruby-asciidoctor")
"--enable-libargon2" '()
;; The default is OpenSSL which provides better PBKDF performance. (list "--disable-asciidoc"))
"--with-crypto_backend=gcrypt" (list
;; GRUB 2.06 supports LUKS2, but does it reliably support all set-ups…? ;; Argon2 is always enabled, this just selects the (faster) full version.
"--with-default-luks-format=LUKS1" "--enable-libargon2"
;; External tokens would need an env variable to work on Guix, and we ;; The default is OpenSSL which provides better PBKDF performance.
;; don't have users for it yet. "--with-crypto_backend=gcrypt"
"--disable-external-tokens" ;; GRUB 2.06 supports LUKS2, but does it reliably support all set-ups…?
"--disable-ssh-token" "--with-default-luks-format=LUKS1"
;; libgcrypt is not found otherwise when cross-compiling. ;; External tokens would need an env variable to work on Guix, and we
;; <https://issues.guix.gnu.org/63864> ;; don't have users for it yet.
(string-append "--with-libgcrypt-prefix=" "--disable-external-tokens"
(assoc-ref %build-inputs "libgcrypt"))))) "--disable-ssh-token"
;; libgcrypt is not found otherwise when cross-compiling.
;; <https://issues.guix.gnu.org/63864>
(string-append "--with-libgcrypt-prefix="
(assoc-ref %build-inputs "libgcrypt"))))))
(native-inputs (native-inputs
(list pkg-config ruby-asciidoctor)) (append (list pkg-config)
(if (supported-package? ruby-asciidoctor)
(list ruby-asciidoctor)
'())))
(inputs (inputs
(list argon2 (list argon2
json-c json-c