summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-11-05 22:00:22 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2020-11-07 13:40:45 +0100
commitd057a9c423e8144865fefd7c8475d61e3263eeb7 (patch)
tree162cce4edf42df69dd1c1d694bb80cfe5aace943 /gnu/packages
parent9fbe695df514dded63a37e0bd55a80ba506a55c3 (diff)
downloadguix-d057a9c423e8144865fefd7c8475d61e3263eeb7.tar.gz
gnu: libscrypt: Add a :static output.
* gnu/packages/crypto.scm (libscrypt)[outputs]: Add "static" to this new
field.
[arguments]: Add an ‘install:static’ phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/crypto.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 1a9cb5c80f..b8ca0134b3 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -571,12 +571,19 @@ attacks than alternative functions such as @code{PBKDF2} or @code{bcrypt}.")
         (base32
          "1d76ys6cp7fi4ng1w3mz2l0p9dbr7ljbk33dcywyimzjz8bahdng"))))
     (build-system gnu-build-system)
+    (outputs (list "out" "static"))
     (arguments
      `(#:make-flags (list (string-append "PREFIX=" %output)
                           "CC=gcc")
        #:phases
        (modify-phases %standard-phases
-         (delete 'configure))))
+         (delete 'configure)            ; no configure script
+         (add-after 'install 'install:static
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib")))
+               (install-file "libscrypt.a" lib)
+               #t))))))
     (home-page "https://lolware.net/libscrypt.html")
     (synopsis "Password hashing library")
     (description "@code{libscrypt} implements @code{scrypt} key derivation