diff --git a/pkgs/by-name/li/libgcrypt/package.nix b/pkgs/by-name/li/libgcrypt/package.nix index 248fa0db55bc..9ae48ef2ddac 100644 --- a/pkgs/by-name/li/libgcrypt/package.nix +++ b/pkgs/by-name/li/libgcrypt/package.nix @@ -69,10 +69,22 @@ stdenv.mkDerivation rec { "build" ]; - postConfigure = '' - sed -i configure \ - -e 's/NOEXECSTACK_FLAGS=$/NOEXECSTACK_FLAGS="-Wa,--noexecstack"/' - ''; + postConfigure = + '' + sed -i configure \ + -e 's/NOEXECSTACK_FLAGS=$/NOEXECSTACK_FLAGS="-Wa,--noexecstack"/' + '' + # The cipher/simd-common-riscv.h wasn't added to the release tarball, please remove this hack on next version update + # https://dev.gnupg.org/T7647 + + lib.optionalString stdenv.hostPlatform.isRiscV '' + cp ${ + fetchurl { + url = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=blob_plain;f=cipher/simd-common-riscv.h;h=8381000f9ac148c60a6963a1d9ec14a3fee1c576;hb=81ce5321b1b79bde6dfdc3c164efb40c13cf656b"; + hash = "sha256-Toe15YLAOYULnLc2fGMMv/xzs/q1t3LsyiqtL7imc+8="; + name = "simd-common-riscv.h"; + } + } cipher/simd-common-riscv.h + ''; enableParallelBuilding = true;