Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 68 lines 2.4 kB view raw
1{ lib, stdenv, buildPackages, gmp, gnum4 2 3# Version specific args 4, version, src 5}: 6 7stdenv.mkDerivation { 8 pname = "nettle"; 9 10 inherit version src; 11 12 outputs = [ "out" "dev" ]; 13 outputBin = "dev"; 14 15 depsBuildBuild = [ buildPackages.stdenv.cc ]; 16 nativeBuildInputs = [ gnum4 ]; 17 propagatedBuildInputs = [ gmp ]; 18 19 configureFlags = 20 # runtime selection of HW-accelerated code; it's default since 3.7 21 [ "--enable-fat" ] 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> 25 # for details. 26 ++ lib.optional stdenv.isSunOS "--with-include-path=${gmp.dev}/include"; 27 28 doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin); 29 30 enableParallelBuilding = true; 31 32 patches = lib.optional (stdenv.hostPlatform.system == "i686-cygwin") 33 ./cygwin.patch; 34 35 meta = with lib; { 36 description = "Cryptographic library"; 37 38 longDescription = '' 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. 48 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. 53 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 58 I/O. 59 ''; 60 61 license = licenses.gpl2Plus; 62 63 homepage = "https://www.lysator.liu.se/~nisse/nettle/"; 64 65 platforms = platforms.all; 66 maintainers = [ maintainers.vcunat ]; 67 }; 68}