@@ -1,4 +1,4 @@
1−{ lib, stdenv, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
1+{ stdenv, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
22
33assert enableCapabilities -> stdenv.isLinux;
44
@@ -14,9 +14,13 @@ stdenv.mkDerivation rec {
1414 outputs = [ "out" "dev" "info" ];
1515 outputBin = "dev";
1616
17− buildInputs =
18− [ libgpgerror ]
19− ++ lib.optional enableCapabilities libcap;
17+ # The CPU Jitter random number generator must not be compiled with
18+ # optimizations and the optimize -O0 pragma only works for gcc.
19+ # The build enables -O2 by default for everything else.
20+ hardeningDisable = stdenv.lib.optional stdenv.cc.isClang "fortify";
21+
22+ buildInputs = [ libgpgerror ]
23+ ++ stdenv.lib.optional enableCapabilities libcap;
2024
2125 # Make sure libraries are correct for .pc and .la files
2226 # Also make sure includes are fixed for callers who don't use libgpgcrypt-config