summary refs log tree commit diff
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2017-08-27 23:05:28 +0300
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2017-08-27 23:05:28 +0300
commit1cfe9539f99d4d0f9dd00a48f79d13e8a37b4d08 (patch)
tree081e6ad10631cd809efb1782e9f891e88fde7ddd
parent724504e0da4b6491dbc2517c685d65cf7f4f4134 (diff)
downloadnixlib-1cfe9539f99d4d0f9dd00a48f79d13e8a37b4d08.tar
nixlib-1cfe9539f99d4d0f9dd00a48f79d13e8a37b4d08.tar.gz
nixlib-1cfe9539f99d4d0f9dd00a48f79d13e8a37b4d08.tar.bz2
nixlib-1cfe9539f99d4d0f9dd00a48f79d13e8a37b4d08.tar.lz
nixlib-1cfe9539f99d4d0f9dd00a48f79d13e8a37b4d08.tar.xz
nixlib-1cfe9539f99d4d0f9dd00a48f79d13e8a37b4d08.tar.zst
nixlib-1cfe9539f99d4d0f9dd00a48f79d13e8a37b4d08.zip
libgcrypt: Add pre-ARMv7 patch
Apparently the assembly-optimized functions use an opcode that doesn't
work on pre-ARMv7. Fix in next release.
-rw-r--r--pkgs/development/libraries/libgcrypt/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix
index 5bcb8c5fe98a..732f3710563a 100644
--- a/pkgs/development/libraries/libgcrypt/default.nix
+++ b/pkgs/development/libraries/libgcrypt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
+{ stdenv, fetchurl, fetchpatch, libgpgerror, enableCapabilities ? false, libcap }:
 
 assert enableCapabilities -> stdenv.isLinux;
 
@@ -22,6 +22,15 @@ stdenv.mkDerivation rec {
   buildInputs = [ libgpgerror ]
     ++ stdenv.lib.optional enableCapabilities libcap;
 
+  # Shouldn't be needed after 1.8.1
+  patches = if stdenv.isArm && stdenv.system != "armv7l-linux"
+    then fetchpatch {
+        url = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=patch;h=4a7aa30ae9f3ce798dd886c2f2d4164c43027748";
+        name = "arm.patch";
+        sha256 = "1dq9s0xwpbg7s5sghvssmwh4v88x733zm6c8ab3flllq8h7c8fq5";
+      }
+    else null;
+
   # Make sure libraries are correct for .pc and .la files
   # Also make sure includes are fixed for callers who don't use libgpgcrypt-config
   postFixup = ''