gnu: bcachefs-tools-static: Fix build.

* gnu/packages/crypto.scm (keyutils)[arguments]: Do build the static
library, but move it to the :static output in a new 'install:static
phase.
* gnu/packages/file-systems.scm (bcachefs-tools/static)[inputs]:
Add this keyutils:static.
This commit is contained in:
Tobias Geerinckx-Rice 2021-12-20 00:50:43 +01:00
parent 83197fdf05
commit a86a6fb6fc
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79
2 changed files with 14 additions and 3 deletions

View file

@ -385,16 +385,26 @@ (define-public keyutils
(arguments (arguments
(list #:make-flags (list #:make-flags
#~(list (string-append "CC=" #$(cc-for-target)) #~(list (string-append "CC=" #$(cc-for-target))
;; "NO_ARLIB=1" would cleanly disable static libraries.
"RPATH=-Wl,-rpath,$(DESTDIR)$(LIBDIR)" "RPATH=-Wl,-rpath,$(DESTDIR)$(LIBDIR)"
(string-append "DESTDIR=" #$output) (string-append "DESTDIR=" #$output)
"INCLUDEDIR=/include" "INCLUDEDIR=/include"
"LIBDIR=/lib" "LIBDIR=/lib"
"MANDIR=/share/man" "MANDIR=/share/man"
"SHAREDIR=/share/keyutils" "SHAREDIR=/share/keyutils")
"NO_ARLIB=1") ; omit static libraries
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(delete 'configure)) ; no configure script (delete 'configure) ; no configure script
(add-after 'install 'install:static
(lambda _
(with-directory-excursion #$output
(for-each (lambda (file)
(let ((target (string-append #$output:static
"/" file)))
(format #t "~a -> ~a\n" file target)
(mkdir-p (dirname target))
(rename-file file target)))
(find-files "lib" "\\.a$"))))))
#:test-target "test")) #:test-target "test"))
(inputs (inputs
(list mit-krb5)) (list mit-krb5))

View file

@ -507,6 +507,7 @@ (define-public bcachefs-tools/static
((".*\\$\\(INSTALL\\).* lib.*") "")))))))) ((".*\\$\\(INSTALL\\).* lib.*") ""))))))))
(inputs (inputs
`(("eudev:static" ,eudev "static") `(("eudev:static" ,eudev "static")
("keyutils:static" ,keyutils "static")
("libscrypt:static" ,libscrypt "static") ("libscrypt:static" ,libscrypt "static")
("lz4:static" ,lz4 "static") ("lz4:static" ,lz4 "static")
("util-linux:static" ,util-linux "static") ; lib{blkid,uuid} ("util-linux:static" ,util-linux "static") ; lib{blkid,uuid}