gnu: libscrypt: Add a :static output.
authorTobias Geerinckx-Rice <me@tobias.gr>
Thu, 5 Nov 2020 21:00:22 +0000 (22:00 +0100)
committerTobias Geerinckx-Rice <me@tobias.gr>
Sat, 7 Nov 2020 12:40:45 +0000 (13:40 +0100)
* gnu/packages/crypto.scm (libscrypt)[outputs]: Add "static" to this new
field.
[arguments]: Add an â€˜install:static’ phase.

gnu/packages/crypto.scm

index 1a9cb5c..b8ca013 100644 (file)
@@ -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