lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

libgcrypt: Massive cleanup and make 1.6 the default

+50 -111
-44
pkgs/development/libraries/libgcrypt/1.6.nix
··· 1 - { fetchurl, stdenv, libgpgerror, transfig, ghostscript, texinfo }: 2 - 3 - stdenv.mkDerivation rec { 4 - name = "libgcrypt-1.6.3"; 5 - 6 - src = fetchurl { 7 - url = "mirror://gnupg/libgcrypt/${name}.tar.bz2"; 8 - sha256 = "0pq2nwfqgggrsh8rk84659d80vfnlkbphwqjwahccd5fjdxr3d21"; 9 - }; 10 - 11 - nativeBuildInputs = [ transfig ghostscript texinfo ]; 12 - 13 - propagatedBuildInputs = [ libgpgerror ]; 14 - 15 - preBuild = '' 16 - (cd doc; make stamp-vti) 17 - ''; 18 - 19 - doCheck = true; 20 - 21 - crossAttrs = let 22 - isCross64 = stdenv.cross.config == "x86_64-w64-mingw32"; 23 - in stdenv.lib.optionalAttrs isCross64 { 24 - configureFlags = [ "--disable-asm" "--disable-padlock-support" ]; 25 - }; 26 - 27 - meta = { 28 - description = "General-pupose cryptographic library"; 29 - 30 - longDescription = '' 31 - GNU Libgcrypt is a general purpose cryptographic library based on 32 - the code from GnuPG. It provides functions for all 33 - cryptographic building blocks: symmetric ciphers, hash 34 - algorithms, MACs, public key algorithms, large integer 35 - functions, random numbers and a lot of supporting functions. 36 - ''; 37 - 38 - license = stdenv.lib.licenses.lgpl2Plus; 39 - 40 - homepage = https://www.gnu.org/software/libgcrypt/; 41 - repositories.git = git://git.gnupg.org/libgcrypt.git; 42 - platforms = stdenv.lib.platforms.all; 43 - }; 44 - }
+42 -31
pkgs/development/libraries/libgcrypt/default.nix
··· 1 - { fetchurl, stdenv, libgpgerror }: 1 + { stdenv, fetchurl 2 + , libgpgerror 3 + 4 + # Optional Dependencies 5 + , libcap ? null, pth ? null 6 + }: 7 + 8 + let 9 + mkFlag = trueStr: falseStr: cond: name: val: 10 + if cond == null then null else 11 + "--${if cond != false then trueStr else falseStr}${name}${if val != null && cond != false then "=${val}" else ""}"; 12 + mkEnable = mkFlag "enable-" "disable-"; 13 + mkWith = mkFlag "with-" "without-"; 14 + mkOther = mkFlag "" "" true; 15 + 16 + shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null; 2 17 3 - stdenv.mkDerivation (rec { 4 - name = "libgcrypt-1.5.4"; 18 + optLibcap = shouldUsePkg libcap; 19 + #optPth = shouldUsePkg pth; 20 + optPth = null; # Broken as of 1.6.3 21 + in 22 + stdenv.mkDerivation rec { 23 + name = "libgcrypt-1.6.3"; 5 24 6 25 src = fetchurl { 7 26 url = "mirror://gnupg/libgcrypt/${name}.tar.bz2"; 8 - sha256 = "d5f88d9f41a46953dc250cdb8575129b37ee2208401b7fa338c897f667c7fb33"; 27 + sha256 = "0pq2nwfqgggrsh8rk84659d80vfnlkbphwqjwahccd5fjdxr3d21"; 9 28 }; 10 29 11 - propagatedBuildInputs = [ libgpgerror ]; 30 + buildInputs = [ libgpgerror optLibcap optPth ]; 12 31 13 - configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-asm"; 32 + configureFlags = [ 33 + (mkWith (optLibcap != null) "capabilities" null) 34 + (mkEnable (optPth != null) "random-daemon" null) 35 + ]; 14 36 15 - doCheck = stdenv.system != "i686-linux"; # "basic" test fails after stdenv+glibc-2.18 16 - 17 - # For some reason the tests don't find `libgpg-error.so'. 18 - checkPhase = '' 19 - LD_LIBRARY_PATH="${libgpgerror}/lib:$LD_LIBRARY_PATH" \ 20 - make check 37 + # Make sure libraries are correct for .pc and .la files 38 + # Also make sure includes are fixed for callers who don't use libgpgcrypt-config 39 + postInstall = '' 40 + sed -i 's,#include <gpg-error.h>,#include "${libgpgerror}/include/gpg-error.h",g' $out/include/gcrypt.h 41 + '' + stdenv.lib.optionalString (optLibcap != null) '' 42 + sed -i 's,\(-lcap\),-L${optLibcap}/lib \1,' $out/lib/libgcrypt.la 21 43 ''; 22 44 23 - patches = [ ./no-build-timestamp.patch ]; 45 + doCheck = true; 24 46 25 - meta = { 47 + meta = with stdenv.lib; { 48 + homepage = https://www.gnu.org/software/libgcrypt/; 26 49 description = "General-pupose cryptographic library"; 27 - 28 - longDescription = '' 29 - GNU Libgcrypt is a general purpose cryptographic library based on 30 - the code from GnuPG. It provides functions for all 31 - cryptographic building blocks: symmetric ciphers, hash 32 - algorithms, MACs, public key algorithms, large integer 33 - functions, random numbers and a lot of supporting functions. 34 - ''; 35 - 36 - license = stdenv.lib.licenses.lgpl2Plus; 37 - 38 - homepage = http://gnupg.org/; 39 - platforms = stdenv.lib.platforms.all; 50 + license = licenses.lgpl2Plus; 51 + platforms = platforms.all; 52 + maintainers = with maintainers; [ wkennington ]; 53 + repositories.git = git://git.gnupg.org/libgcrypt.git; 40 54 }; 41 - } # old "as" problem, see #616 and http://gnupg.10057.n7.nabble.com/Fail-to-build-on-freebsd-7-3-td30245.html 42 - // stdenv.lib.optionalAttrs (stdenv.isFreeBSD && stdenv.isi686) 43 - { configureFlags = [ "--disable-aesni-support" ]; } 44 - ) 55 + }
-12
pkgs/development/libraries/libgcrypt/no-build-timestamp.patch
··· 1 - diff -ur libgcrypt-1.5.3.orig/configure libgcrypt-1.5.3/configure 2 - --- libgcrypt-1.5.3.orig/configure 2013-07-25 11:22:47.000000000 +0200 3 - +++ libgcrypt-1.5.3/configure 2014-04-09 00:17:58.659147199 +0200 4 - @@ -16520,6 +16520,7 @@ 5 - 6 - 7 - BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` 8 - +BUILD_TIMESTAMP=1970-01-01T00:01+0000 9 - 10 - 11 - cat >>confdefs.h <<_ACEOF 12 - Only in libgcrypt-1.5.3: out
+2 -2
pkgs/os-specific/windows/cygwin-setup/default.nix
··· 1 1 { stdenv, fetchcvs, autoconf, automake, libtool, flex, bison, pkgconfig 2 - , zlib, bzip2, lzma, libgcrypt_1_6 2 + , zlib, bzip2, lzma, libgcrypt 3 3 }: 4 4 5 5 with stdenv.lib; ··· 24 24 buildInputs = map mkStatic (o.buildInputs or []); 25 25 propagatedBuildInputs = map mkStatic (o.propagatedBuildInputs or []); 26 26 }); 27 - in map mkStatic [ zlib bzip2 lzma libgcrypt_1_6 ]; 27 + in map mkStatic [ zlib bzip2 lzma libgcrypt ]; 28 28 29 29 configureFlags = "--disable-shared"; 30 30
+6 -22
pkgs/top-level/all-packages.nix
··· 827 827 syslogng_incubator = callPackage ../tools/system/syslog-ng-incubator { }; 828 828 829 829 rsyslog = callPackage ../tools/system/rsyslog { 830 - libgcrypt = libgcrypt_1_6; 831 830 czmq = null; # Currently Broken 832 831 hadoop = null; # Currently Broken 833 832 }; ··· 1512 1511 # use config.packageOverrides if you prefer original gnupg1 1513 1512 gnupg1 = gnupg1compat; 1514 1513 1515 - gnupg20 = callPackage ../tools/security/gnupg/20.nix { 1516 - libgcrypt = libgcrypt_1_6; 1517 - }; 1514 + gnupg20 = callPackage ../tools/security/gnupg/20.nix { }; 1518 1515 1519 - gnupg21 = callPackage ../tools/security/gnupg/21.nix { 1520 - libgcrypt = libgcrypt_1_6; 1521 - }; 1516 + gnupg21 = callPackage ../tools/security/gnupg/21.nix { }; 1522 1517 1523 1518 gnupg = gnupg20; 1524 1519 ··· 6602 6597 6603 6598 libgcrypt = callPackage ../development/libraries/libgcrypt { }; 6604 6599 6605 - libgcrypt_1_6 = lowPrio (callPackage ../development/libraries/libgcrypt/1.6.nix { }); 6606 - 6607 6600 libgdiplus = callPackage ../development/libraries/libgdiplus { }; 6608 6601 6609 6602 libgksu = callPackage ../development/libraries/libgksu { }; ··· 6848 6841 6849 6842 libosmpbf = callPackage ../development/libraries/libosmpbf {}; 6850 6843 6851 - libotr = callPackage ../development/libraries/libotr { 6852 - libgcrypt = libgcrypt_1_6; 6853 - }; 6844 + libotr = callPackage ../development/libraries/libotr { }; 6854 6845 6855 6846 libotr_3_2 = callPackage ../development/libraries/libotr/3.2.nix { }; 6856 6847 ··· 8762 8753 python = python2; 8763 8754 pythonPackages = python2Packages; 8764 8755 kerberos = heimdal; 8765 - libgcrypt = libgcrypt_1_6; 8766 8756 gnutls = gnutls33; 8767 8757 cups = if stdenv.isDarwin then null else cups; 8768 8758 pam = if stdenv.isDarwin then null else pam; ··· 9014 9004 9015 9005 criu = callPackage ../os-specific/linux/criu { }; 9016 9006 9017 - cryptsetup = callPackage ../os-specific/linux/cryptsetup { 9018 - libgcrypt = libgcrypt_1_6; 9019 - }; 9007 + cryptsetup = callPackage ../os-specific/linux/cryptsetup { }; 9020 9008 9021 9009 cramfsswap = callPackage ../os-specific/linux/cramfsswap { }; 9022 9010 ··· 11042 11030 inherit (gnome3) goffice gnome_icon_theme; 11043 11031 }; 11044 11032 11045 - gnunet = callPackage ../applications/networking/p2p/gnunet { 11046 - libgcrypt = libgcrypt_1_6; 11047 - }; 11033 + gnunet = callPackage ../applications/networking/p2p/gnunet { }; 11048 11034 11049 - gnunet_svn = lowPrio (callPackage ../applications/networking/p2p/gnunet/svn.nix { 11050 - libgcrypt = libgcrypt_1_6; 11051 - }); 11035 + gnunet_svn = lowPrio (callPackage ../applications/networking/p2p/gnunet/svn.nix { }); 11052 11036 11053 11037 gocr = callPackage ../applications/graphics/gocr { }; 11054 11038