summary refs log tree commit diff
path: root/pkgs/development/libraries/libgcrypt
diff options
context:
space:
mode:
authorSymphorien Gibol <symphorien+git@xlumurb.eu>2021-02-12 12:23:37 +0100
committerSymphorien Gibol <symphorien+git@xlumurb.eu>2021-02-12 21:11:16 +0100
commit756ace721e1bf5638b3bd8c3eb63f3a48fdfdeec (patch)
treee3e12860458db36ef25063af1df9a1a7ab484011 /pkgs/development/libraries/libgcrypt
parent733d24b50b63cef38c9d228e127c9d09865afc16 (diff)
downloadnixpkgs-756ace721e1bf5638b3bd8c3eb63f3a48fdfdeec.tar
nixpkgs-756ace721e1bf5638b3bd8c3eb63f3a48fdfdeec.tar.gz
nixpkgs-756ace721e1bf5638b3bd8c3eb63f3a48fdfdeec.tar.bz2
nixpkgs-756ace721e1bf5638b3bd8c3eb63f3a48fdfdeec.tar.lz
nixpkgs-756ace721e1bf5638b3bd8c3eb63f3a48fdfdeec.tar.xz
nixpkgs-756ace721e1bf5638b3bd8c3eb63f3a48fdfdeec.tar.zst
nixpkgs-756ace721e1bf5638b3bd8c3eb63f3a48fdfdeec.zip
libgcrypt: fix build on musl32
Diffstat (limited to 'pkgs/development/libraries/libgcrypt')
-rw-r--r--pkgs/development/libraries/libgcrypt/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix
index 081b67b1663..f3db8d8c03b 100644
--- a/pkgs/development/libraries/libgcrypt/default.nix
+++ b/pkgs/development/libraries/libgcrypt/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, gettext, libgpgerror, enableCapabilities ? false, libcap
-, buildPackages
+, buildPackages, fetchpatch
 }:
 
 assert enableCapabilities -> stdenv.isLinux;
@@ -13,6 +13,15 @@ stdenv.mkDerivation rec {
     sha256 = "1nb50bgzp83q6r5cz4v40y1mcbhpqwqyxlay87xp1lrbkf5pm9n5";
   };
 
+  patches = [
+    # fix build on 32bit musl
+    (fetchpatch {
+      name = "fix_building_with_disable-asm_on_x86.patch";
+      url = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff_plain;h=af23ab5c5482d625ff52e60606cf044e2b0106c8";
+      sha256 = "1m8apm8wra6fk89ggha4d0bba5absihm38zvb2khklqh9q5hj9jw";
+    })
+  ];
+
   outputs = [ "out" "dev" "info" ];
   outputBin = "dev";
 
@@ -27,6 +36,8 @@ stdenv.mkDerivation rec {
     ++ lib.optional stdenv.isDarwin gettext
     ++ lib.optional enableCapabilities libcap;
 
+  strictDeps = true;
+
   configureFlags = [ "--with-libgpg-error-prefix=${libgpgerror.dev}" ]
    ++ lib.optional stdenv.hostPlatform.isMusl "--disable-asm";