git.iko.soy/typeable/nixpkgs
on master help sign in
fix spotify by using older libgcrypt
commit165cb05ea5f42866a5b38521a8266f10045d48b2 authorEmil Rangden <emil.rangden@chas.se> dateWed 3 Jun 2015, 16:50 (12 years ago) parent0645f5e
2 files changed+53
pkgs/development/libraries/libgcrypt/1.5.nix+50 pkgs/top-level/all-packages.nix+3
pkgs/development/libraries/libgcrypt/1.5.nixnew file+50
@@ -0,0 +1,50 @@
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+}
pkgs/top-level/all-packages.nix+3
@@ -6763,6 +6763,8 @@ let
67636763 libcap = null;
67646764 };
67656765
6766+ libgcrypt_1_5 = lowPrio (callPackage ../development/libraries/libgcrypt/1.5.nix { });
6767+
67666768 libgdiplus = callPackage ../development/libraries/libgdiplus { };
67676769
67686770 libgksu = callPackage ../development/libraries/libgksu { };
@@ -12384,6 +12386,7 @@ let
1238412386
1238512387 spotify = callPackage ../applications/audio/spotify {
1238612388 inherit (gnome) GConf;
12389+ libgcrypt = libgcrypt_1_5;
1238712390 libpng = libpng12;
1238812391 };
1238912392