From b4052c96ee252bd65ede6b7f0983942cb653a36c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 30 Jul 2018 16:22:04 +0200 Subject: gnu: nettle: Move static libraries to separate output. * gnu/packages/nettle.scm (nettle-2)[outputs]: Add "static". [arguments]: Add #:phases. --- gnu/packages/nettle.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gnu/packages/nettle.scm b/gnu/packages/nettle.scm index 67a3062a5a..1212f32812 100644 --- a/gnu/packages/nettle.scm +++ b/gnu/packages/nettle.scm @@ -44,8 +44,22 @@ ;; $libdir, which is not the case by default. Work around it. '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") - "/lib")))) - (outputs '("out" "debug")) + "/lib")) + #: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))) (propagated-inputs `(("gmp" ,gmp))) (home-page "https://www.lysator.liu.se/~nisse/nettle/") -- cgit v1.2.3