diff --git a/gnu/packages/cryptsetup.scm b/gnu/packages/cryptsetup.scm index 2b6cc635ee..91517dc48a 100644 --- a/gnu/packages/cryptsetup.scm +++ b/gnu/packages/cryptsetup.scm @@ -24,6 +24,7 @@ (define-module (gnu packages cryptsetup) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix gexp) #:use-module (guix utils) @@ -121,8 +122,13 @@ (define (static-library library) (arguments (substitute-keyword-arguments (package-arguments library) ((#:configure-flags flags #~'()) - #~(append '("--disable-shared" "--enable-static") - #$flags)))))) + (let* ((build-system (package-build-system library)) + (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 ;; Stripped-down statically-linked 'cryptsetup' command for use in initrds. @@ -179,7 +185,7 @@ (define-public cryptsetup-static (propagated-inputs `(("libgpg-error-host" ,(static-library libgpg-error))))))) `(("argon2" ,(static-library argon2)) - ("json-c" ,(static-library json-c-0.13)) + ("json-c" ,(static-library json-c)) ("libgcrypt" ,libgcrypt-static) ("lvm2" ,lvm2-static) ("util-linux" ,util-linux "static")