gnu: nettle: Move static libraries to separate output.

* gnu/packages/nettle.scm (nettle-2)[outputs]: Add "static".
[arguments]: Add #:phases.
This commit is contained in:
Marius Bakke 2018-07-30 16:22:04 +02:00
parent d37d975b74
commit b4052c96ee
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 16 additions and 2 deletions

View File

@ -44,8 +44,22 @@
;; $libdir, which is not the case by default. Work around it. ;; $libdir, which is not the case by default. Work around it.
'(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %outputs "out") (assoc-ref %outputs "out")
"/lib")))) "/lib"))
(outputs '("out" "debug")) #:phases (modify-phases %standard-phases
(add-after 'install 'move-static-libraries
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(slib (string-append (assoc-ref outputs "static")
"/lib")))
(mkdir-p slib)
(with-directory-excursion (string-append out "/lib")
(for-each (lambda (ar)
(rename-file ar (string-append
slib "/"
(basename ar))))
(find-files "." "\\.a$")))
#t))))))
(outputs '("out" "debug" "static"))
(native-inputs `(("m4" ,m4))) (native-inputs `(("m4" ,m4)))
(propagated-inputs `(("gmp" ,gmp))) (propagated-inputs `(("gmp" ,gmp)))
(home-page "https://www.lysator.liu.se/~nisse/nettle/") (home-page "https://www.lysator.liu.se/~nisse/nettle/")