summary refs log tree commit diff
path: root/pkgs/development/libraries/libgcrypt
diff options
context:
space:
mode:
authorstrager <strager.nds@gmail.com>2019-05-03 11:14:18 -0700
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2019-05-03 14:14:17 -0400
commit21112a7c169d8ebbd7a27d706fc287d6495a3a6d (patch)
treef532ff71daace702c770f027cde348fc18f1a96b /pkgs/development/libraries/libgcrypt
parenta602026454a0dd9ede658e4c75e251a21a0aa3aa (diff)
downloadnixpkgs-21112a7c169d8ebbd7a27d706fc287d6495a3a6d.tar
nixpkgs-21112a7c169d8ebbd7a27d706fc287d6495a3a6d.tar.gz
nixpkgs-21112a7c169d8ebbd7a27d706fc287d6495a3a6d.tar.bz2
nixpkgs-21112a7c169d8ebbd7a27d706fc287d6495a3a6d.tar.lz
nixpkgs-21112a7c169d8ebbd7a27d706fc287d6495a3a6d.tar.xz
nixpkgs-21112a7c169d8ebbd7a27d706fc287d6495a3a6d.tar.zst
nixpkgs-21112a7c169d8ebbd7a27d706fc287d6495a3a6d.zip
libgcrypt: fix 1.5 build on macOS (#59507)
libgcrypt-1.5's configure script incorrectly detects x86_64-apple-darwin
(macOS) as an ELF platform. This causes failures when compiling assembly
sources. Backport libgcrypt's fix for this issue, fixing libgcrypt-1.5's
build on macOS.
Diffstat (limited to 'pkgs/development/libraries/libgcrypt')
-rw-r--r--pkgs/development/libraries/libgcrypt/1.5.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libgcrypt/1.5.nix b/pkgs/development/libraries/libgcrypt/1.5.nix
index 2ccdd14874a..80cb6641bfb 100644
--- a/pkgs/development/libraries/libgcrypt/1.5.nix
+++ b/pkgs/development/libraries/libgcrypt/1.5.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
+{ lib, stdenv, fetchpatch, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
 
 assert enableCapabilities -> stdenv.isLinux;
 
@@ -10,6 +10,14 @@ stdenv.mkDerivation rec {
     sha256 = "0ydy7bgra5jbq9mxl5x031nif3m6y3balc6ndw2ngj11wnsjc61h";
   };
 
+  patches = stdenv.lib.optionals stdenv.isDarwin [
+    (fetchpatch {
+      name = "fix-x86_64-apple-darwin.patch";
+      sha256 = "138sfwl1avpy19320dbd63mskspc1khlc93j1f1zmylxx3w19csi";
+      url = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=patch;h=71939faa7c54e7b4b28d115e748a85f134876a02";
+    })
+  ];
+
   buildInputs =
     [ libgpgerror ]
     ++ lib.optional enableCapabilities libcap;