Merge pull request #8157 from monocell/spotify-fix

fix spotify by using older libgcrypt

lethalman 8e564526 a714ddcb

+53
+50
pkgs/development/libraries/libgcrypt/1.5.nix
··· 1 + { stdenv, fetchurl 2 + , libgpgerror 3 + 4 + # Optional Dependencies 5 + , libcap ? 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 + mkWith = mkFlag "with-" "without-"; 13 + 14 + shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null; 15 + 16 + optLibcap = shouldUsePkg libcap; 17 + in 18 + stdenv.mkDerivation rec { 19 + name = "libgcrypt-1.5.4"; 20 + 21 + src = fetchurl { 22 + url = "mirror://gnupg/libgcrypt/${name}.tar.bz2"; 23 + sha256 = "0czvqxkzd5y872ipy6s010ifwdwv29sqbnqc4pf56sd486gqvy6m"; 24 + }; 25 + 26 + buildInputs = [ libgpgerror optLibcap ]; 27 + 28 + configureFlags = [ 29 + (mkWith (optLibcap != null) "capabilities" null) 30 + ]; 31 + 32 + # Make sure libraries are correct for .pc and .la files 33 + # Also make sure includes are fixed for callers who don't use libgpgcrypt-config 34 + postInstall = '' 35 + sed -i 's,#include <gpg-error.h>,#include "${libgpgerror}/include/gpg-error.h",g' $out/include/gcrypt.h 36 + '' + stdenv.lib.optionalString (!stdenv.isDarwin && optLibcap != null) '' 37 + sed -i 's,\(-lcap\),-L${optLibcap}/lib \1,' $out/lib/libgcrypt.la 38 + ''; 39 + 40 + doCheck = true; 41 + 42 + meta = with stdenv.lib; { 43 + homepage = https://www.gnu.org/software/libgcrypt/; 44 + description = "General-pupose cryptographic library"; 45 + license = licenses.lgpl2Plus; 46 + platforms = platforms.all; 47 + maintainers = with maintainers; [ wkennington ]; 48 + repositories.git = git://git.gnupg.org/libgcrypt.git; 49 + }; 50 + }
+3
pkgs/top-level/all-packages.nix
··· 6787 6787 libcap = null; 6788 6788 }; 6789 6789 6790 + libgcrypt_1_5 = lowPrio (callPackage ../development/libraries/libgcrypt/1.5.nix { }); 6791 + 6790 6792 libgdiplus = callPackage ../development/libraries/libgdiplus { }; 6791 6793 6792 6794 libgksu = callPackage ../development/libraries/libgksu { }; ··· 12417 12419 12418 12420 spotify = callPackage ../applications/audio/spotify { 12419 12421 inherit (gnome) GConf; 12422 + libgcrypt = libgcrypt_1_5; 12420 12423 libpng = libpng12; 12421 12424 }; 12422 12425