1 { lib, stdenv, buildPackages, gmp, gnum4
3 # Version specific args
12 outputs = [ "out" "dev" ];
15 depsBuildBuild = [ buildPackages.stdenv.cc ];
16 nativeBuildInputs = [ gnum4 ];
17 propagatedBuildInputs = [ gmp ];
20 # runtime selection of HW-accelerated code; it's default since 3.7
22 # Make sure the right <gmp.h> is found, and not the incompatible
23 # /usr/include/mp.h from OpenSolaris. See
24 # <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
26 ++ lib.optional stdenv.isSunOS "--with-include-path=${gmp.dev}/include";
28 doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin);
30 enableParallelBuilding = true;
32 patches = lib.optional (stdenv.hostPlatform.system == "i686-cygwin")
36 description = "Cryptographic library";
39 Nettle is a cryptographic library that is designed to fit
40 easily in more or less any context: In crypto toolkits for
41 object-oriented languages (C++, Python, Pike, ...), in
42 applications like LSH or GNUPG, or even in kernel space. In
43 most contexts, you need more than the basic cryptographic
44 algorithms, you also need some way to keep track of available
45 algorithms, their properties and variants. You often have
46 some algorithm selection process, often dictated by a protocol
47 you want to implement.
49 And as the requirements of applications differ in subtle and
50 not so subtle ways, an API that fits one application well can
51 be a pain to use in a different context. And that is why
52 there are so many different cryptographic libraries around.
54 Nettle tries to avoid this problem by doing one thing, the
55 low-level crypto stuff, and providing a simple but general
56 interface to it. In particular, Nettle doesn't do algorithm
57 selection. It doesn't do memory allocation. It doesn't do any
61 license = licenses.gpl2Plus;
63 homepage = "https://www.lysator.liu.se/~nisse/nettle/";
65 platforms = platforms.all;
66 maintainers = [ maintainers.vcunat ];