| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 |
|
| 22 | (define-module (gnu packages nettle)
|
| 23 | #:use-module (guix gexp)
|
| 24 | #:use-module (guix utils)
|
| 25 | #:use-module (guix licenses)
|
| 26 | #:use-module (guix packages)
|
| 27 | #:use-module (guix download)
|
| 28 | #:use-module (guix build-system gnu)
|
| 29 | #:use-module (gnu packages)
|
| 30 | #:use-module (gnu packages multiprecision)
|
| 31 | #:use-module (gnu packages m4))
|
| 32 |
|
| 33 | (define-public nettle
|
| 34 | (package
|
| 35 | (name "nettle")
|
| 36 | (version "3.10.2")
|
| 37 | (source (origin
|
| 38 | (method url-fetch)
|
| 39 | (uri (string-append "mirror://gnu/nettle/nettle-"
|
| 40 | version ".tar.gz"))
|
| 41 | (sha256
|
| 42 | (base32
|
| 43 | "1d8rnlgmzi3mnv17yvpjxav5max05nli133bbbkbbazjn4fgb7zy"))))
|
| 44 | (build-system gnu-build-system)
|
| 45 | (arguments
|
| 46 | (list
|
| 47 | #:configure-flags
|
| 48 | #~(list "--enable-fat"
|
| 49 | |
| 50 | |
| 51 | |
| 52 | (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
|
| 53 | #:phases
|
| 54 | #~(modify-phases %standard-phases
|
| 55 | (add-after 'install 'move-static-libraries
|
| 56 | (lambda _
|
| 57 | (mkdir-p (string-append #$output:static "/lib"))
|
| 58 | (with-directory-excursion (string-append #$output "/lib")
|
| 59 | (for-each
|
| 60 | (lambda (ar)
|
| 61 | (rename-file
|
| 62 | ar
|
| 63 | (string-append #$output:static "/lib/" (basename ar))))
|
| 64 | (find-files
|
| 65 | "."
|
| 66 | #$(if (target-mingw?)
|
| 67 | '(lambda (filename _)
|
| 68 | (and (string-suffix? ".a" filename)
|
| 69 | (not (string-suffix? ".dll.a" filename))))
|
| 70 | "\\.a$")))))))))
|
| 71 | (outputs '("out" "debug" "static"))
|
| 72 | (native-inputs (list m4))
|
| 73 | (propagated-inputs (list gmp))
|
| 74 | (home-page "https://www.lysator.liu.se/~nisse/nettle/")
|
| 75 | (synopsis "C library for low-level cryptographic functionality")
|
| 76 | (description
|
| 77 | "GNU Nettle is a low-level cryptographic library. It is designed to
|
| 78 | fit in easily in almost any context. It can be easily included in
|
| 79 | cryptographic toolkits for object-oriented languages or in applications
|
| 80 | themselves.")
|
| 81 | (license gpl2+)))
|