lol
1{ stdenv, gmp, gnum4
2
3# Version specific args
4, version, src
5, ...}:
6
7stdenv.mkDerivation (rec {
8 name = "nettle-${version}";
9
10 inherit src;
11
12 outputs = [ "out" "dev" ];
13 outputBin = "dev";
14
15 buildInputs = [ gnum4 ];
16 propagatedBuildInputs = [ gmp ];
17
18 doCheck = (stdenv.system != "i686-cygwin" && !stdenv.isDarwin);
19
20 enableParallelBuilding = true;
21
22 patches = stdenv.lib.optional (stdenv.system == "i686-cygwin")
23 ./cygwin.patch;
24
25 meta = with stdenv.lib; {
26 description = "Cryptographic library";
27
28 longDescription = ''
29 Nettle is a cryptographic library that is designed to fit
30 easily in more or less any context: In crypto toolkits for
31 object-oriented languages (C++, Python, Pike, ...), in
32 applications like LSH or GNUPG, or even in kernel space. In
33 most contexts, you need more than the basic cryptographic
34 algorithms, you also need some way to keep track of available
35 algorithms, their properties and variants. You often have
36 some algorithm selection process, often dictated by a protocol
37 you want to implement.
38
39 And as the requirements of applications differ in subtle and
40 not so subtle ways, an API that fits one application well can
41 be a pain to use in a different context. And that is why
42 there are so many different cryptographic libraries around.
43
44 Nettle tries to avoid this problem by doing one thing, the
45 low-level crypto stuff, and providing a simple but general
46 interface to it. In particular, Nettle doesn't do algorithm
47 selection. It doesn't do memory allocation. It doesn't do any
48 I/O.
49 '';
50
51 license = licenses.gpl2Plus;
52
53 homepage = http://www.lysator.liu.se/~nisse/nettle/;
54
55 maintainers = with maintainers; [ wkennington ];
56 platforms = platforms.all;
57 };
58}
59
60//
61
62stdenv.lib.optionalAttrs stdenv.isSunOS {
63 # Make sure the right <gmp.h> is found, and not the incompatible
64 # /usr/include/mp.h from OpenSolaris. See
65 # <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
66 # for details.
67 configureFlags = [ "--with-include-path=${gmp.dev}/include" ];
68})