projects/guix·blob kernel-updates · refs

138 lines · 5.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014, 2020 Eric Bavier <[email protected]>
3;;; Copyright © 2016 Efraim Flashner <[email protected]>
4;;; Copyright © 2025 Andreas Enge <[email protected]>
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages mcrypt)
22 #:use-module (guix build-system gnu)
23 #:use-module (guix download)
24 #:use-module (guix gexp)
25 #:use-module ((guix licenses) #:select (gpl2+))
26 #:use-module (guix packages)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages perl))
30
31(define-public mcrypt
32 (package
33 (name "mcrypt")
34 (version "2.6.8")
35 (source
36 (origin
37 (method url-fetch)
38 (uri (string-append "mirror://sourceforge/mcrypt/MCrypt/"
39 version "/" name "-" version ".tar.gz"))
40 (sha256
41 (base32
42 "161031n1w9pb4yzz9i47szc12a4mwpcpvyxnvafsik2l9s2aliai"))
43 (patches (search-patches
44 "mcrypt-CVE-2012-4409.patch"
45 "mcrypt-CVE-2012-4426.patch"
46 "mcrypt-CVE-2012-4527.patch"))))
47 (build-system gnu-build-system)
48 (inputs
49 (list zlib libmcrypt libmhash))
50 (arguments
51 (list
52 #:phases
53 #~(modify-phases %standard-phases
54 (add-before 'configure 'set-CFLAGS
55 (lambda _
56 (setenv "CFLAGS"
57 (string-append
58 "-g -O2 "
59 "-Wno-error=pointer-sign "
60 "-Wno-error=implicit-function-declaration "
61 "-Wno-error=address")))))))
62 (home-page "https://mcrypt.sourceforge.net/")
63 (synopsis "Replacement for the popular Unix crypt command")
64 (description
65 "MCrypt is a replacement for the old crypt() package and crypt(1)
66command, with extensions. It allows developers to use a wide range of
67encryption functions, without making drastic changes to their code. It allows
68users to encrypt files or data streams without having to be cryptographers.
69The companion to MCrypt is Libmcrypt, which contains the actual encryption
70functions themselves, and provides a standardized mechanism for accessing
71them.")
72 (license gpl2+)))
73
74(define-public libmcrypt
75 (package
76 (name "libmcrypt")
77 (version "2.5.8")
78 (source
79 (origin
80 (method url-fetch)
81 (uri (string-append "mirror://sourceforge/mcrypt/Libmcrypt/" version
82 "/libmcrypt-" version ".tar.gz"))
83 (sha256
84 (base32
85 "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"))))
86 (build-system gnu-build-system)
87 (arguments
88 (list
89 #:phases
90 #~(modify-phases %standard-phases
91 (add-before 'configure 'set-CFLAGS
92 (lambda _
93 ;; Setting STDC_HEADERS causes inclusion of standard
94 ;; headers in lib/libdefs.h.
95 (setenv "CFLAGS" (string-append "-g -O2 -DSTDC_HEADERS "
96 "-Wno-error=implicit-int")))))))
97 (home-page "https://mcrypt.sourceforge.net/")
98 (synopsis "Encryption algorithm library")
99 (description
100 "Libmcrypt is a data encryption library. The library is thread safe and
101provides encryption and decryption functions. This version of the library
102supports many encryption algorithms and encryption modes. Some algorithms
103which are supported: SERPENT, RIJNDAEL, 3DES, GOST, SAFER+, CAST-256, RC2,
104XTEA, 3WAY, TWOFISH, BLOWFISH, ARCFOUR, WAKE and more.")
105 (license gpl2+)))
106
107(define-public libmhash
108 (package
109 (name "libmhash")
110 (version "0.9.9.9")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (string-append "mirror://sourceforge/mhash/mhash/" version
115 "/mhash-" version ".tar.bz2"))
116 (sha256
117 (base32
118 "1w7yiljan8gf1ibiypi6hm3r363imm3sxl1j8hapjdq3m591qljn"))
119 (patches (search-patches "mhash-keygen-test-segfault.patch"
120 "libmhash-hmac-fix-uaf.patch"))))
121 (build-system gnu-build-system)
122 (native-inputs
123 (list perl)) ;for tests
124 (home-page "https://mhash.sourceforge.net/")
125 (synopsis "Thread-safe hash library")
126 (description
127 "Mhash is a thread-safe hash library, implemented in C, and provides a
128uniform interface to a large number of hash algorithms. These algorithms can
129be used to compute checksums, message digests, and other signatures. The HMAC
130support implements the basics for message authentication, following RFC 2104.
131
132Algorithms currently supplied are:
133
134CRC-32, CRC-32B, ALDER-32, MD-2, MD-4, MD-5, RIPEMD-128, RIPEMD-160,
135RIPEMD-256, RIPEMD-320, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, HAVAL-128,
136HAVAL-160, HAVAL-192, HAVAL-256, TIGER, TIGER-128, TIGER-160, GOST, WHIRLPOOL,
137SNEFRU-128, SNEFRU-256.")
138 (license gpl2+)))