projects/guix·blob javascript-team · refs

81 lines · 3.3 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <[email protected]>
3;;; Copyright © 2016, 2021 Mark H Weaver <[email protected]>
4;;; Copyright © 2017, 2020-2022 Efraim Flashner <[email protected]>
5;;; Copyright © 2021 Maxim Cournoyer <[email protected]>
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
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 ;; 'sexp-conv' and other programs need to have their RUNPATH
50 ;; point to $libdir, which is not the case by default. Work
51 ;; around it.
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
78fit in easily in almost any context. It can be easily included in
79cryptographic toolkits for object-oriented languages or in applications
80themselves.")
81 (license gpl2+)))