gnu: cryptsetup-static: Update to latest json-c (0.18).

* gnu/packages/cryptsetup.scm (static-library): Also cater for the cmake build
system.
(cryptsetup-static)[inputs]: Update to use json-c instead of json-c-0.13.

Change-Id: Ic1d3644227d34d72204b4f670f1c84bfcea19702
This commit is contained in:
Janneke Nieuwenhuizen 2025-01-01 12:10:27 +01:00
parent 269da0d77f
commit c13bf0ba66
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -24,6 +24,7 @@ (define-module (gnu packages cryptsetup)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (guix utils) #:use-module (guix utils)
@ -121,8 +122,13 @@ (define (static-library library)
(arguments (arguments
(substitute-keyword-arguments (package-arguments library) (substitute-keyword-arguments (package-arguments library)
((#:configure-flags flags #~'()) ((#:configure-flags flags #~'())
#~(append '("--disable-shared" "--enable-static") (let* ((build-system (package-build-system library))
#$flags)))))) (static-flags (cond ((eq? build-system cmake-build-system)
'("-DBUILD_SHARED_LIBS=OFF"))
(else
'("--disable-shared" "--enable-static")))))
#~(append '#$static-flags
#$flags)))))))
(define-public cryptsetup-static (define-public cryptsetup-static
;; Stripped-down statically-linked 'cryptsetup' command for use in initrds. ;; Stripped-down statically-linked 'cryptsetup' command for use in initrds.
@ -179,7 +185,7 @@ (define-public cryptsetup-static
(propagated-inputs (propagated-inputs
`(("libgpg-error-host" ,(static-library libgpg-error))))))) `(("libgpg-error-host" ,(static-library libgpg-error)))))))
`(("argon2" ,(static-library argon2)) `(("argon2" ,(static-library argon2))
("json-c" ,(static-library json-c-0.13)) ("json-c" ,(static-library json-c))
("libgcrypt" ,libgcrypt-static) ("libgcrypt" ,libgcrypt-static)
("lvm2" ,lvm2-static) ("lvm2" ,lvm2-static)
("util-linux" ,util-linux "static") ("util-linux" ,util-linux "static")