anchor.diff:      url = "mirror://gnupg/libgcrypt/${pname}-${version}.tar.bz2";
       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";
  
positive.code:   buildInputs = [ libgpgerror ]
      ++ lib.optional stdenv.isDarwin gettext
      ++ lib.optional enableCapabilities libcap;
  
    configureFlags = [ "--with-libgpg-error-prefix=${libgpgerror.dev}" ]
     ++ lib.optional stdenv.hostPlatform.isMusl "--disable-asm";
  
negative.code: { lib, stdenv, fetchurl, gettext, libgpgerror, enableCapabilities ? false, libcap
  , buildPackages, fetchpatch
  }:
  
  assert enableCapabilities -> stdenv.isLinux;
  